/* Request Estimate Form Styles */

#request-estimate-form {
    background-color: #f8f9fa;
}

#request-estimate-form .card {
    border: none;
    transition: box-shadow 0.3s ease;
}

#request-estimate-form .card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

/* Form Labels */
#request-estimate-form .form-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* Labels dos inputs de arquivo - z-index e alinhamento */
#request-estimate-form label[for^="upload_"] {
    z-index: 1 !important;
    position: relative;
    display: block;
    width: 100%;
    text-align: left;
    margin-bottom: 0.5rem !important;
}

/* Garantir alinhamento do form-group dos uploads */
#request-estimate-form .col-md-6.col-lg-4.mb-4 .form-group {
    display: flex;
    flex-direction: column;
    width: 100%;
    align-items: stretch;
}

#request-estimate-form .col-md-6.col-lg-4.mb-4 .form-group > label[for^="upload_"] {
    order: 1;
    margin-bottom: 0.5rem !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
    z-index: 1 !important;
    position: relative;
}

#request-estimate-form .col-md-6.col-lg-4.mb-4 .form-group > .upload-container {
    order: 2;
    width: 100%;
    margin-top: 0 !important;
}

/* Input Fields */
#request-estimate-form .form-control {
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

#request-estimate-form .form-control:focus {
    border-color: var(--bs-primary, #0d6efd);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

#request-estimate-form .form-control.is-invalid {
    border-color: #dc3545;
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath d='m5.8 3.6 .4.4.4-.4m0 4.8-.4-.4-.4.4'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

#request-estimate-form .form-control.is-valid {
    border-color: #198754;
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='m2.3 6.73.98-.98-.98-.98L1.32 4.77l.98.98-.98.98zm1.4-3.46L2.3 2.29l-.98.98.98.98.98-.98z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

/* Invalid Feedback */
#request-estimate-form .invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875em;
    color: #dc3545;
}

/* Phone Call Section */
#request-estimate-form .phone-call-section {
    background-color: #006C4F;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 108, 79, 0.4);
}

#request-estimate-form .phone-call-section h2 {
    color: #E5C200;
    font-weight: 700;
    position: relative;
    z-index: 1;
}

#request-estimate-form .phone-call-section h4 {
    color: #ffffff;
    position: relative;
    z-index: 1;
}

#request-estimate-form .phone-call-section .phone-option {
    position: relative;
    z-index: 1;
}

#request-estimate-form .phone-call-section .phone-option p {
    display: none;
}

#request-estimate-form .phone-call-section .btn {
    min-width: 200px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    white-space: nowrap;
}

#request-estimate-form .phone-call-section .btn-secondary {
    background-color: #E5C200;
    border-color: #E5C200;
    color: #212529;
    font-weight: 700;
}

#request-estimate-form .phone-call-section .btn-secondary:hover {
    background-color: #ffd700;
    border-color: #ffd700;
    transform: translateY(-2px);
    color: #212529;
}

#request-estimate-form .phone-call-section .btn-outline-secondary {
    background-color: transparent;
    border-color: #E5C200;
    color: #E5C200;
    font-weight: 700;
}

#request-estimate-form .phone-call-section .btn-outline-secondary:hover {
    background-color: #E5C200;
    border-color: #E5C200;
    color: #000000 !important;
    transform: translateY(-2px);
}

#request-estimate-form .phone-call-section .btn-outline-secondary:hover .phone-number {
    color: #000000 !important;
}

#request-estimate-form .phone-call-section .btn .phone-number {
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 0;
    display: inline;
}

/* Upload Section */
#request-estimate-form .upload-container {
    position: relative;
    background-color: transparent;
    border: 2px solid #E5C200;
    border-radius: 0.75rem;
    padding: 1rem;
    transition: all 0.3s ease;
    box-shadow: none;
    min-height: 70px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
}

#request-estimate-form .upload-container:hover {
    background-color: rgba(229, 194, 0, 0.05);
    border-color: #E5C200;
    box-shadow: 0 4px 12px rgba(229, 194, 0, 0.2);
    transform: translateY(-2px);
    border-width: 3px;
}

/* Todos os cards com mesmo estilo */
#request-estimate-form .upload-container[data-area="kitchen"],
#request-estimate-form .upload-container[data-area="main_bedroom"],
#request-estimate-form .upload-container[data-area="main_bathroom"],
#request-estimate-form .upload-container[data-area="guest_bedroom"],
#request-estimate-form .upload-container[data-area="guest_bathroom"],
#request-estimate-form .upload-container[data-area="living_room"],
#request-estimate-form .upload-container[data-area="lanai"],
#request-estimate-form .upload-container[data-area="others"] {
    background-color: transparent;
    border-color: #E5C200;
}

#request-estimate-form .file-upload {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 10;
}

#request-estimate-form .file-upload::-webkit-file-upload-button {
    visibility: hidden;
}

#request-estimate-form .upload-content {
    position: relative;
    z-index: 1;
    width: 100%;
    pointer-events: none;
}

#request-estimate-form .upload-icon-circle {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000000;
    font-size: 18px;
    background: transparent;
    box-shadow: none;
}

/* Todos os círculos sem fundo e ícone preto */
#request-estimate-form .upload-container[data-area="kitchen"] .upload-icon-circle,
#request-estimate-form .upload-container[data-area="main_bedroom"] .upload-icon-circle,
#request-estimate-form .upload-container[data-area="main_bathroom"] .upload-icon-circle,
#request-estimate-form .upload-container[data-area="guest_bedroom"] .upload-icon-circle,
#request-estimate-form .upload-container[data-area="guest_bathroom"] .upload-icon-circle,
#request-estimate-form .upload-container[data-area="living_room"] .upload-icon-circle,
#request-estimate-form .upload-container[data-area="lanai"] .upload-icon-circle,
#request-estimate-form .upload-container[data-area="others"] .upload-icon-circle {
    background: transparent;
    color: #000000;
}

#request-estimate-form .upload-text {
    display: flex;
    align-items: center;
    min-height: 24px;
}

#request-estimate-form .upload-label {
    font-weight: 600;
    color: #212529;
    font-size: 0.875rem;
}

#request-estimate-form .file-name {
    font-weight: 500;
    color: #212529;
    font-size: 0.95rem;
    word-break: break-word;
}

#request-estimate-form .file-name.d-none {
    display: none !important;
}

#request-estimate-form .file-count-text {
    text-align: center;
    color: rgba(0, 0, 0, 0.5);
    font-size: 0.7rem;
    font-weight: 400;
    margin-top: 0.5rem;
}

#request-estimate-form .upload-preview {
    margin-top: 1rem;
    width: 100%;
    text-align: center;
}

#request-estimate-form .preview-wrapper {
    position: relative;
    display: inline-block;
}

#request-estimate-form .preview-image,
#request-estimate-form .preview-video {
    border-radius: 0.5rem;
    border: 2px solid #006C4F;
}

#request-estimate-form .remove-upload {
    border-radius: 50%;
    width: 24px;
    height: 24px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
}

#request-estimate-form .file-name {
    word-break: break-all;
    max-width: 150px;
}

/* Checkbox Styling */
#request-estimate-form .form-check {
    display: flex;
    align-items: flex-start;
    width: 100%;
    max-width: 100%;
}

#request-estimate-form .form-check-input {
    margin-top: 0.25rem;
    cursor: pointer;
    flex-shrink: 0;
    width: 1.25em;
    height: 1.25em;
    border: 1px solid #dee2e6;
    background-color: #fff;
}

#request-estimate-form .form-check-input:checked {
    background-color: #0d6efd !important;
    border-color: #0d6efd !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10l3 3l6-6'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: contain !important;
}

#request-estimate-form .form-check-input.is-invalid {
    border-color: #dc3545;
}

#request-estimate-form .form-check-label {
    cursor: pointer;
    line-height: 1.5;
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
    box-sizing: border-box;
}

#request-estimate-form .form-check-label.small {
    padding-left: 5px !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

#request-estimate-form #footer-sms-consent .d-flex {
    width: 100% !important;
    max-width: 100% !important;
}

#request-estimate-form #footer-sms-consent .flex-grow-1 {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
}

#request-estimate-form #footer-sms-consent .form-check-label {
    width: 100% !important;
    max-width: 100% !important;
    display: block !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
}

/* Select Styling */
#request-estimate-form select.form-control {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
    padding-right: 2.5rem;
}

/* Submit Button */
#request-estimate-form #submit-estimate {
    min-width: 200px;
    padding: 0.75rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

#request-estimate-form #submit-estimate:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

#request-estimate-form #submit-estimate:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Loading Spinner */
#request-estimate-form #loading-spinner {
    width: 3rem;
    height: 3rem;
}

/* Section Headings */
#request-estimate-form h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

#request-estimate-form h2 mark {
    background-color: transparent;
    color: #006C4F;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    position: relative;
    display: inline-block;
    vertical-align: baseline;
    line-height: inherit;
    z-index: 1;
}

#request-estimate-form h2 mark::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 34%;
    background-color: #E5C200;
    z-index: -1;
    animation: slideInMark 1s ease-out forwards;
    animation-delay: 0.3s;
    pointer-events: none;
}

#request-estimate-form h2 mark,
#request-estimate-form h2 mark * {
    position: relative;
    z-index: 2;
}

@keyframes slideInMark {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

#request-estimate-form h4 {
    font-size: 1.1rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    #request-estimate-form .card {
        padding: 1.5rem !important;
    }

    #request-estimate-form h2 {
        font-size: 1.5rem;
    }

    #request-estimate-form h4 {
        font-size: 1rem;
    }

    #request-estimate-form .phone-call-section .btn {
        min-width: 100%;
        width: 100%;
    }

    #request-estimate-form #submit-estimate {
        width: 100%;
        min-width: auto;
    }
}

/* Google Places Autocomplete Styling */
.pac-container {
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    border: 1px solid var(--bs-primary, #0d6efd);
    margin-top: 0.25rem;
}

.pac-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid #e9ecef;
}

.pac-item:hover {
    background-color: #f8f9fa;
}

.pac-item-selected {
    background-color: rgba(13, 110, 253, 0.1);
}

/* Animation for form sections */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#request-estimate-form .card {
    animation: fadeInUp 0.5s ease-out;
}

#request-estimate-form .card:nth-child(1) {
    animation-delay: 0.1s;
}

#request-estimate-form .card:nth-child(2) {
    animation-delay: 0.2s;
}

#request-estimate-form .card:nth-child(3) {
    animation-delay: 0.3s;
}

#request-estimate-form .card:nth-child(4) {
    animation-delay: 0.4s;
}

/* Focus states for accessibility */
#request-estimate-form .form-control:focus,
#request-estimate-form .form-select:focus,
#request-estimate-form .form-check-input:focus {
    outline: 2px solid var(--bs-primary, #0d6efd);
    outline-offset: 2px;
}

/* Flow Sections */
#request-estimate-form .flow-section {
    transition: opacity 0.4s ease, transform 0.4s ease;
}

#request-estimate-form #flow-2 {
    animation: fadeInUp 0.5s ease-out;
}

/* Self Estimate Warning Message */
#request-estimate-form .alert-warning {
    background-color: #fff3cd;
    border-color: #ffc107;
    color: #856404;
    border-left: 4px solid #ffc107;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

#request-estimate-form .alert-warning strong {
    color: #856404;
    font-weight: 700;
}

#request-estimate-form .alert-warning i {
    color: #ffc107;
}

/* Flow Action Buttons */
#request-estimate-form #go-to-self-estimate {
    transition: all 0.3s ease;
}

#request-estimate-form #go-to-self-estimate:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

#request-estimate-form #submit-flow1,
#request-estimate-form #submit-flow2 {
    transition: all 0.3s ease;
}

#request-estimate-form #submit-flow1:hover:not(:disabled),
#request-estimate-form #submit-flow2:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* Print styles */
@media print {
    #request-estimate-form .phone-call-section,
    #request-estimate-form #submit-estimate,
    #request-estimate-form #submit-flow1,
    #request-estimate-form #submit-flow2,
    #request-estimate-form #go-to-self-estimate,
    #request-estimate-form .remove-upload {
        display: none;
    }
}

/* Header Phone Buttons - Modern Hover Effects */
#header-internal .phone-option .btn-secondary,
.custom-header .phone-option .btn-secondary {
    background-color: #E5C200;
    border-color: #E5C200;
    color: #212529;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#header-internal .phone-option .btn-secondary:hover,
.custom-header .phone-option .btn-secondary:hover {
    color: #212529 !important;
    background-color: #E5C200 !important;
    border-color: #E5C200 !important;
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 20px rgba(229, 194, 0, 0.4), 0 0 20px rgba(229, 194, 0, 0.3);
}

#header-internal .phone-option .btn-secondary:hover .phone-number,
.custom-header .phone-option .btn-secondary:hover .phone-number {
    color: #212529 !important;
}

#header-internal .phone-option .btn-secondary:active,
.custom-header .phone-option .btn-secondary:active {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 4px 12px rgba(229, 194, 0, 0.3);
}

/* Efeito de brilho sutil no hover */
#header-internal .phone-option .btn-secondary::before,
.custom-header .phone-option .btn-secondary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

#header-internal .phone-option .btn-secondary:hover::before,
.custom-header .phone-option .btn-secondary:hover::before {
    left: 100%;
}


