/* CSS Variables for Theme Colors */
:root {
    --efw-primary-color: #79461B;
    --efw-secondary-color: #54595F;
    --efw-accent-color: #61CE70;
    --efw-dark-color: #44513E;
    --efw-text-color: #7A7A7A;
    --efw-light-bg: #FBF1E1;
    --efw-white: #ffffff;
    --efw-dark-text: #333;
    --efw-border-light: #e9ecef;
    --efw-border-medium: #ddd;
    --efw-gray-light: #aaa;
    --efw-black: #000;
    --efw-disabled: #ccc;
    --efw-success-bg: #d4edda;
    --efw-success-text: #155724;
    --efw-success-border: #c3e6cb;
    --efw-error-bg: #f8d7da;
    --efw-error-text: #721c24;
    --efw-error-border: #f5c6cb;
}

/* Enquiry Button Styles */
.efw-enquiry-button-wrapper {
    display: inline-block;
    width: 100%;
}

.efw-enquiry-btn {
    display: inline-block;
    padding: 12px 24px;
    background-color: var(--efw-primary-color);
    color: var(--efw-white);
    border: none;
    border-radius: 0px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(121, 70, 27, 0.3);
}

.efw-enquiry-btn:hover {
    background-color: var(--efw-secondary-color);
    box-shadow: 0 4px 12px rgba(121, 70, 27, 0.5);
    transform: translateY(-2px);
}

.efw-enquiry-btn:active {
    transform: translateY(0);
}

/* Button Size Classes */
.efw-enquiry-btn.efw-btn-small {
    padding: 8px 16px;
    font-size: 14px;
}

.efw-enquiry-btn.efw-btn-medium {
    padding: 12px 24px;
    font-size: 16px;
}

.efw-enquiry-btn.efw-btn-large {
    padding: 16px 32px;
    font-size: 18px;
}

/* Link Styles (when displayed as link) */
.efw-enquiry-link {
    display: inline-block;
    padding: 12px 24px;
    background-color: var(--efw-primary-color);
    color: var(--efw-white);
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(121, 70, 27, 0.3);
    text-decoration: none;
}

.efw-enquiry-link:hover {
    background-color: var(--efw-secondary-color);
    box-shadow: 0 4px 12px rgba(121, 70, 27, 0.5);
    transform: translateY(-2px);
    text-decoration: none;
    color: var(--efw-white);
}

.efw-enquiry-link:active {
    transform: translateY(0);
}

/* Link Size Classes */
.efw-enquiry-link.efw-btn-small {
    padding: 8px 16px;
    font-size: 14px;
}

.efw-enquiry-link.efw-btn-medium {
    padding: 12px 24px;
    font-size: 16px;
}

.efw-enquiry-link.efw-btn-large {
    padding: 16px 32px;
    font-size: 18px;
}

/* Modal Styles */
.efw-modal {
    display: none;
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: efw-fadeIn 0.3s ease;
    padding: 20px;
}

.efw-modal.show {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 60px;
}

@keyframes efw-fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.efw-modal-content {
    background-color: var(--efw-white);
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    animation: efw-slideIn 0.3s ease;
    margin-left: 0;
    max-height: 90vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

@keyframes efw-slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.efw-modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--efw-border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.efw-modal-header h2 {
    margin: 0;
    font-size: 18px;
    color: var(--efw-dark-text);
    flex: 1;
    word-break: break-word;
}

.efw-modal-close {
    font-size: 24px;
    font-weight: bold;
    color: var(--efw-gray-light);
    cursor: pointer;
    transition: color 0.2s ease;
    margin-left: 10px;
    flex-shrink: 0;
}

.efw-modal-close:hover {
    color: var(--efw-black);
}

.efw-modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

/* Form Styles */
.efw-enquiry-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.efw-form-group {
    display: flex;
    flex-direction: column;
}

.efw-form-group label {
    margin-bottom: 6px;
    font-weight: 600;
    color: var(--efw-dark-text);
    font-size: 14px;
}

.efw-form-group-error {
    display: none;
    color: var(--efw-error-text);
    font-size: 12px;
    margin-top: 4px;
    font-weight: 500;
}

.efw-form-group.has-error .efw-form-group-error {
    display: block;
}

.efw-form-group input,
.efw-form-group textarea {
    padding: 10px 12px;
    border: 1px solid var(--efw-border-medium);
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.efw-form-group input:focus,
.efw-form-group textarea:focus {
    outline: none;
    border-color: var(--efw-primary-color);
    box-shadow: 0 0 0 3px rgba(121, 70, 27, 0.1);
}

.efw-form-group input.error,
.efw-form-group textarea.error {
    border-color: var(--efw-error-text);
    background-color: rgba(248, 215, 218, 0.3);
}

.efw-form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.efw-submit-btn {
    padding: 12px 20px;
    background-color: var(--efw-primary-color);
    color: var(--efw-white);
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.efw-submit-btn:hover {
    background-color: var(--efw-secondary-color);
}

.efw-submit-btn:disabled {
    background-color: var(--efw-disabled);
    cursor: not-allowed;
}

.efw-form-message {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 4px;
    display: none;
    font-size: 14px;
}

.efw-form-message.success {
    display: block;
    background-color: var(--efw-success-bg);
    color: var(--efw-success-text);
    border: 1px solid var(--efw-success-border);
}

.efw-form-message.error {
    display: block;
    background-color: var(--efw-error-bg);
    color: var(--efw-error-text);
    border: 1px solid var(--efw-error-border);
}

/* WhatsApp Button Styles */
.efw-whatsapp-button {
    position: fixed;
    bottom: 95px;
    right: 20px;
    z-index: 9998;
    animation: efw-popIn 0.5s ease;
}

@keyframes efw-popIn {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.efw-whatsapp-button a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background-color: var(--efw-accent-color);
    color: var(--efw-white);
    border-radius: 50%;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    transition: all 0.3s ease;
}

.efw-whatsapp-button a:hover {
    background-color: #20ba5a;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.8);
    transform: scale(1.15);
}

.efw-whatsapp-icon {
    width: 45px;
    height: 45px;
    object-fit: contain;
    display: block;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .efw-modal {
        padding: 10px;
    }
    
    .efw-modal.show {
        align-items: flex-start;
        justify-content: center;
        padding-top: 20px;
    }
    
    .efw-modal-content {
        width: 100%;
        max-width: none;
        margin-left: 0;
        max-height: calc(100vh - 40px);
    }
    
    .efw-modal-header {
        padding: 12px 15px;
    }
    
    .efw-modal-header h2 {
        font-size: 16px;
    }
    
    .efw-modal-close {
        font-size: 20px;
    }
    
    .efw-modal-body {
        padding: 15px;
    }
    
    .efw-form-group {
        gap: 6px;
    }
    
    .efw-form-group input,
    .efw-form-group textarea {
        font-size: 16px;
        padding: 10px 12px;
    }
    
    .efw-submit-btn {
        padding: 10px 15px;
        font-size: 14px;
    }
    
    .efw-whatsapp-button {
        bottom: 20px;
        right: 20px;
    }
    
    .efw-whatsapp-button a {
        width: 60px;
        height: 60px;
    }
    
    .efw-whatsapp-icon {
        width: 36px;
        height: 36px;
    }
    
    .efw-enquiry-btn {
        width: 100%;
    }
}

/* Close modal when clicking outside */
.efw-modal.show {
    display: flex;
}

.efw-modal {
    display: none;
}
