/**
 * Public styles for CallMeBack Lite
 */

/* Button ripple effect */
.callmeback-button {
    overflow: hidden;
    position: relative;
}

.callmeback-ripple {
    position: absolute;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 100px;
    height: 100px;
    margin-top: -50px;
    margin-left: -50px;
    animation: ripple 0.7s ease-out;
}

@keyframes ripple {
    from {
        transform: scale(0);
        opacity: 1;
    }
    to {
        transform: scale(3);
        opacity: 0;
    }
}

/* Modal open state */
body.callmeback-modal-open {
    overflow: hidden;
}

/* Floating Button */
.callmeback-button {
    position: fixed;
    z-index: 999999;
    width: 60px;
    height: 60px;
    border: none;
    border-radius: 50%;
    background-color: #2563EB; /* Default color */
    color: #fff;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    will-change: transform;
}

.callmeback-button svg {
    width: 28px;
    height: 28px;
    stroke: #ffffff;
    transition: transform 0.3s ease;
}

.callmeback-button:hover {
    transform: translateY(-2px) scale(1.05);
}

.callmeback-button:hover svg {
    transform: rotate(-10deg);
}

.callmeback-button.bottom-right {
    bottom: 30px;
    right: 30px;
}

.callmeback-button.bottom-left {
    bottom: 30px;
    left: 30px;
}

/* Modal */
.callmeback-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000000;
    backdrop-filter: blur(4px);
}

.callmeback-modal-content {
    position: relative;
    background-color: #fff;
    margin: 5% auto;
    padding: 35px;
    width: 90%;
    max-width: 500px;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.callmeback-close {
    position: absolute;
    right: 25px;
    top: 20px;
    font-size: 28px;
    font-weight: 300;
    color: #666;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.callmeback-close:hover {
    background-color: #f5f5f5;
    color: #333;
}

.callmeback-modal-header {
    margin-bottom: 30px;
}

.callmeback-modal-header h2 {
    margin: 0 0 10px;
    font-size: 28px;
    color: #1d2327;
    font-weight: 600;
}

.callmeback-subtitle {
    margin: 0;
    color: #666;
    font-size: 16px;
}

/* Form */
.callmeback-form-group {
    margin-bottom: 20px;
}

.callmeback-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #1d2327;
    font-size: 15px;
}

.callmeback-form-group input[type="text"],
.callmeback-form-group input[type="tel"],
.callmeback-form-group input[type="email"],
.callmeback-form-group select,
.callmeback-form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.2s ease;
    background-color: #fff;
}

.callmeback-form-group input:focus,
.callmeback-form-group select:focus,
.callmeback-form-group textarea:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.callmeback-form-group input::placeholder,
.callmeback-form-group textarea::placeholder {
    color: #999;
    font-size: 14px;
}

.callmeback-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    color: #666;
}

.callmeback-checkbox input[type="checkbox"] {
    margin-top: 4px;
}

.callmeback-checkbox a {
    color: #0066cc;
    text-decoration: none;
    margin-left: 4px;
}

.callmeback-checkbox a:hover {
    text-decoration: underline;
}

.callmeback-submit {
    width: 100%;
    padding: 14px;
    background-color: #0066cc;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.callmeback-submit:hover {
    background-color: #0052a3;
    transform: translateY(-1px);
}

.callmeback-submit:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    transform: none;
}

.callmeback-message {
    margin-top: 20px;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    font-size: 15px;
}

.callmeback-message.success {
    background-color: #ecfdf3;
    color: #0a5132;
    border: 1px solid #6ce9a6;
}

.callmeback-message.error {
    background-color: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.callmeback-footer {
    margin-top: 25px;
    text-align: center;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.callmeback-powered-by {
    font-size: 13px;
    color: #666;
    margin: 0;
    text-align: right;
}

.callmeback-powered-by a {
    color: #0066cc;
    text-decoration: none;
    font-weight: 500;
}

.callmeback-powered-by a:hover {
    text-decoration: underline;
}

/* Loading state */
.callmeback-submit.loading {
    position: relative;
    color: transparent;
}

.callmeback-submit.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s infinite linear;
}

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

/* Responsive */
@media screen and (max-width: 600px) {
    .callmeback-modal-content {
        margin: 0;
        width: 100%;
        height: 100vh;
        max-width: none;
        border-radius: 0;
        padding: 25px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .callmeback-form-group input[type="text"],
    .callmeback-form-group input[type="tel"],
    .callmeback-form-group input[type="email"],
    .callmeback-form-group select,
    .callmeback-form-group textarea {
        font-size: 16px; /* Prevents zoom on iOS */
        -webkit-appearance: none; /* Fixes iOS styling */
        appearance: none;
    }

    .callmeback-button {
        width: 50px;
        height: 50px;
    }

    .callmeback-button svg {
        width: 24px;
        height: 24px;
    }

    .callmeback-button.bottom-right {
        bottom: 20px;
        right: 20px;
    }

    .callmeback-button.bottom-left {
        bottom: 20px;
        left: 20px;
    }

    .callmeback-modal-header h2 {
        font-size: 24px;
    }

    .callmeback-close {
        top: 15px;
        right: 15px;
    }
}

/* Success Message */
.callmeback-success-modal {
    text-align: center;
    padding: 30px 20px;
}

.callmeback-success-modal svg {
    width: 60px;
    height: 60px;
    color: #10b981;
    margin-bottom: 20px;
}

.callmeback-success-modal h3 {
    font-size: 24px;
    color: #1d2327;
    margin: 0 0 15px;
}

.callmeback-success-modal p {
    color: #666;
    font-size: 16px;
    margin: 0 0 25px;
}

.callmeback-success-modal .callmeback-powered-by {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    text-align: right;
} 