/* Custom Enquiry Form - Frontend Styles */

/* Chat Icon */
.cef-chat-icon {
    position: fixed;
    bottom: 20px;
    right: 20px;
    min-width: 100px;
    height: 60px;
    padding: 0 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    z-index: 9998;
    animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 0 0 0 rgba(102, 126, 234, 0.7);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25), 0 0 20px 10px rgba(102, 126, 234, 0);
    }
}

.cef-chat-icon:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    animation: none;
}

.cef-icon-text {
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    animation: textBlink 2s ease-in-out infinite;
}

@keyframes textBlink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.cef-chat-icon svg {
    width: 30px;
    height: 30px;
    color: #ffffff;
}

.cef-chat-icon.active {
    transform: scale(0.9);
    opacity: 0;
    pointer-events: none;
}

/* Chat Container */
.cef-chat-container {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 380px;
    max-width: calc(100vw - 40px);
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Chat Header */
.cef-chat-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    padding: 20px;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cef-chat-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.cef-close-btn {
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.cef-close-btn:hover {
    transform: rotate(90deg);
}

/* Chat Body */
.cef-chat-body {
    padding: 20px;
    max-height: 500px;
    overflow-y: auto;
}

/* Form Styles */
.cef-form-group {
    margin-bottom: 16px;
}

.cef-form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.cef-form-group .required {
    color: #e74c3c;
}

.cef-form-group input[type="text"],
.cef-form-group input[type="email"],
.cef-form-group input[type="tel"],
.cef-form-group textarea,
.cef-form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.cef-form-group input:focus,
.cef-form-group textarea:focus,
.cef-form-group select:focus {
    outline: none;
    border-color: #667eea;
}

.cef-form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* Phone Input Group */
.cef-phone-input {
    display: flex;
    gap: 8px;
}

.cef-phone-input select {
    width: 110px;
    flex-shrink: 0;
}

.cef-phone-input input {
    flex: 1;
}

/* Submit Button */
.cef-submit-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.cef-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.cef-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Spinner */
.cef-spinner {
    animation: rotate 2s linear infinite;
    width: 20px;
    height: 20px;
}

.cef-spinner .path {
    stroke: #ffffff;
    stroke-linecap: round;
    animation: dash 1.5s ease-in-out infinite;
}

@keyframes rotate {
    100% {
        transform: rotate(360deg);
    }
}

@keyframes dash {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }
    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}

/* Form Message */
.cef-form-message {
    margin-top: 12px;
    padding: 10px;
    border-radius: 6px;
    font-size: 14px;
    display: none;
}

.cef-form-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.cef-form-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

/* Thank You View */
.cef-thank-you {
    text-align: center;
    padding: 20px 0;
}

.cef-success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

.cef-success-icon svg {
    width: 40px;
    height: 40px;
    color: #ffffff;
}

.cef-thank-you h3 {
    margin: 0 0 12px;
    font-size: 24px;
    color: #333;
}

.cef-thank-you p {
    margin: 0 0 20px;
    color: #666;
    font-size: 15px;
    line-height: 1.5;
}

.cef-new-enquiry-btn {
    padding: 10px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cef-new-enquiry-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .cef-chat-container {
        bottom: 80px;
        right: 10px;
        left: 10px;
        width: auto;
        max-width: none;
    }
    
    .cef-chat-icon {
        bottom: 15px;
        right: 15px;
        min-width: 90px;
        height: 50px;
        padding: 0 16px;
    }
    
    .cef-icon-text {
        font-size: 14px;
    }
    
    .cef-phone-input {
        flex-direction: column;
    }
    
    .cef-phone-input select {
        width: 100%;
    }
}
