/* Custom Quote Form Styles */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Khula:wght@300;400;600;700&display=swap');

.custom-quote-form-wrapper {
    max-width: 1280px;
    margin: 0 auto;
    padding: 20px;
}

.custom-quote-form-container {
    border: 1px solid #670B05;
    border-radius: 10px;
    padding: 90px;
}

/* Form Header */
.form-header {
    text-align: center;
    margin-bottom: 50px;
}

.form-title {
    font-family: 'The Seasons', serif;
    font-size: 56px;
    font-weight: normal;
    color: #670B05;
    margin: 0 0 10px 0;
    line-height: 1.2;
}

.form-title em {
    font-family: 'The Seasons', serif;
    font-style: italic;
    font-weight: normal;
}

.form-subtitle {
    font-family: 'Khula', sans-serif;
    font-size: 16px;
    color: #8B6B5F;
    margin: 0;
    font-weight: 400;
}

/* Form Layout */
.custom-quote-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.form-group {
    display: flex;
    flex-direction: row;
    gap: 8px;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

/* Labels */
.form-group label {
    font-family: 'The Seasons', serif;
    font-size: 24px;
    color: #670B05;
    font-weight: normal;
	min-width: 130px;
}

.required {
    color: #670B05;
}

/* Input Fields */
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="date"],
.form-group select,
.form-group textarea {
    font-family: 'Khula', sans-serif;
    font-size: 16px !important;
    padding: 12px 16px 9px 16px !important;
    border: 1px solid #670B05 !important;
    background: transparent;
    color: #670B05 !important;
    border-radius: 0 !important;
    transition: all 0.3s ease !important;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group input[type="tel"]:focus,
.form-group input[type="date"]:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #670B05;
    box-shadow: 0 0 0 3px rgba(103, 11, 5, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #A0756B;
    opacity: 0.7;
}

/* Select Dropdown */
.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%23670B05' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 18px center;
    padding-right: 45px;
    cursor: pointer;
}

/* Date Input with Flatpickr */
.form-group input#quote-date {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='2' y='3' width='16' height='15' rx='2' stroke='%23670B05' stroke-width='1.5'/%3E%3Cpath d='M6 1V5M14 1V5M2 8H18' stroke='%23670B05' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 18px center;
    padding-right: 45px !important;
}

/* Flatpickr calendar customization */
.flatpickr-calendar {
    font-family: 'Khula', sans-serif !important;
    border: 1px solid #670B05 !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 16px rgba(103, 11, 5, 0.15) !important;
}

.flatpickr-months {
    background: #670B05 !important;
}

.flatpickr-current-month .flatpickr-monthDropdown-months,
.flatpickr-current-month input.cur-year {
    color: #FFFFFF !important;
    font-weight: 600;
}

.flatpickr-weekday {
    color: #670B05 !important;
    font-weight: 600;
}

.flatpickr-day {
    color: #670B05 !important;
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange {
    background: #670B05 !important;
    border-color: #670B05 !important;
}

.flatpickr-day:hover {
    background: #FFF5F0 !important;
    border-color: #670B05 !important;
}

.flatpickr-months .flatpickr-prev-month:hover svg,
.flatpickr-months .flatpickr-next-month:hover svg {
    fill: #FFFFFF !important;
}

.flatpickr-months .flatpickr-prev-month svg,
.flatpickr-months .flatpickr-next-month svg {
    fill: rgba(255, 255, 255, 0.7) !important;
}

/* Contact Via Buttons */
.contact-via-group label {
    margin-bottom: 4px;
}

.contact-buttons {
    display: flex;
    gap: 12px;
}

.contact-btn {
    flex: 1;
    font-family: 'Khula', sans-serif;
    font-size: 15px;
    font-weight: 600;
    padding: 8px 23px;
    border: 1px solid #670B05;
    border-radius: 8px;
    background: transparent;
    color: #670B05;
    cursor: pointer;
	border-radius: 50px;
    transition: all 0.3s ease;
}

.contact-btn:hover {
    background: #FFF5F0;
}

.contact-btn.active {
    background: #670B05;
    color: #FFFFFF;
}

/* Textarea */
.form-group textarea {
    resize: vertical;
    min-height: 120px;
    font-family: 'Khula', sans-serif;
}

/* Submit Button */
.form-submit {
    margin-top: 20px;
    text-align: center;
}

.submit-btn {
    background-color: #02010100;
    font-family: "The Seasons", Sans-serif;
    font-size: 18px;
    line-height: 24px;
    text-transform: uppercase;
    fill: #670B05;
    color: #670B05;
    border-style: solid;
    border-width: 1px;
    border-color: #670B05;
    border-radius: 50px 50px 50px 50px;
    padding: 10px 36px 10px 36px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.submit-btn:hover {
    background: #670B05;
    color: #FFFFFF;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(103, 11, 5, 0.2);
}

.submit-btn:hover svg,
.submit-btn:hover svg path {
	stroke:#fff;
	fill: #fff;
}

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn svg {
    transition: transform 0.3s ease;
}

.submit-btn:hover svg {
    transform: translateX(4px);
}

/* Success Popup */
.quote-popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.quote-popup-overlay.active {
    display: flex;
}

.quote-popup {
    background: #FFF9F5;
    border: 2px solid #670B05;
    border-radius: 20px;
    padding: 60px 50px;
    max-width: 600px;
    width: 90%;
    position: relative;
    text-align: center;
    animation: slideUp 0.4s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.popup-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    font-size: 32px;
    line-height: 1;
    color: #670B05;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.popup-close:hover {
    transform: rotate(90deg);
}

.popup-title {
    font-family: 'The Seasons', serif;
    font-size: 42px;
    font-weight: normal;
    color: #670B05;
    margin: 0 0 24px 0;
    line-height: 1.2;
}

.popup-message {
    font-family: 'Khula', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #5A4138;
    margin: 0 0 32px 0;
}

.popup-message strong {
    font-weight: 700;
    color: #670B05;
}

.popup-continue-btn {
    font-family: 'Khula', sans-serif;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 14px 40px;
    border: 1px solid #670B05;
    border-radius: 30px;
    background: transparent;
    color: #670B05;
    cursor: pointer;
    transition: all 0.3s ease;
}

.popup-continue-btn:hover {
    background: #670B05;
    color: #FFFFFF;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(103, 11, 5, 0.2);
}

.form-group.full-width label {
	font-size: 17px;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.flatpickr-day.flatpickr-disabled, .flatpickr-day.flatpickr-disabled:hover {
    color: rgba(57, 57, 57, 0.1) !important;
}

/* Loading State */
.submit-btn.loading {
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
}

.submit-btn.loading::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #670B05;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-left: 8px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
	.form-header {
		margin-bottom: 16px;
	}
	
	.form-group label {
		font-size: 14px;
		margin: 0!important;
	}
	
	.custom-quote-form {
		gap: 16px;
	}
	
	.contact-btn {
    	width: fit-content;
		flex: unset;
	}
	
	.contact-buttons {
		flex-direction: row;
	}
	
	.form-group {
		flex-direction: column;
	}
	
    .custom-quote-form-container {
        padding: 0;
    }
    
    .form-title {
        font-size: 42px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .quote-popup {
        padding: 40px 30px;
        width: 95%;
    }
    
    .popup-title {
        font-size: 32px;
    }
	
	textarea {
		min-height: 100px!important;
	}
}

@media (max-width: 480px) {
    .custom-quote-form-container {
        padding: 30px 20px;
    }
    
    .form-title {
        font-size: 36px;
    }
    
    .form-subtitle {
        font-size: 14px;
    }
    
    .submit-btn {
        width: 100%;
        justify-content: center;
    }
}
