/* 
 * Simple Contact Form Plugin Styles
 */

/* Reset & Variables */
:root {
    --scf-primary-color: #3b5998;
    /* The blue from the Submit button */
    --scf-bg-color: #f2f4f7;
    /* Background color of inputs */
    --scf-text-color: #333333;
    --scf-placeholder-color: #999999;
    --scf-border-radius: 6px;
    --scf-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}

#scf-widget-wrapper {
    font-family: var(--scf-font-family);
    position: relative;
    z-index: 999999;
    /* Ensure it stays on top of most WP themes */
}

/* -----------------------------------------
    Floating Button 
 ----------------------------------------- */
#scf-floating-btn {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background-color: #25d366;
    /* WhatsApp style green as requested "like the whatsapp button" */
    color: #ffffff;
    padding: 12px 20px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#scf-floating-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
}

.scf-btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.scf-btn-icon svg {
    width: 22px;
    height: 22px;
}

.scf-btn-text {
    font-weight: 600;
    font-size: 15px;
    line-height: 1;
}

/* -----------------------------------------
    Modal Overlay 
 ----------------------------------------- */
#scf-modal-overlay {
    display: none;
    /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999998;
    /* Just below the modal box */
    backdrop-filter: blur(2px);
}

/* -----------------------------------------
    Modal Box 
 ----------------------------------------- */
#scf-modal-box {
    display: none;
    /* Hidden by default */
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #ffffff;
    width: 400px;
    /* Fixed width */
    max-width: 90vw;
    /* Responsive for small screens */
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    z-index: 999999;
    padding: 30px 40px;
    box-sizing: border-box;
}

#scf-close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    color: #aaa;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease;
}

#scf-close-btn:hover {
    color: #333;
}

.scf-modal-content h3 {
    margin-top: 0;
    margin-bottom: 25px;
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    color: var(--scf-text-color);
}

/* -----------------------------------------
    Form Elements 
 ----------------------------------------- */
#scf-contact-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.scf-input-group {
    position: relative;
    width: 100%;
}

.scf-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    /* Let clicks pass through to input */
}

/* Explicitly size the SVG icons */
.scf-icon svg {
    width: 16px;
    height: 16px;
}

.scf-input-group input {
    width: 100%;
    height: 48px;
    padding-left: 45px;
    /* Make room for icon */
    padding-right: 15px;
    background-color: var(--scf-bg-color);
    border: 1px solid #e0e0e0;
    border-radius: var(--scf-border-radius);
    font-size: 15px;
    color: var(--scf-text-color);
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, padding 0.2s ease;
}

/* When user focuses or types, hide icon and reduce padding */
.scf-input-group input:focus,
.scf-input-group input:not(:placeholder-shown) {
    padding-left: 15px;
}

.scf-input-group input:focus+.scf-icon,
.scf-input-group input:not(:placeholder-shown)+.scf-icon {
    display: none;
}

.scf-input-group input:focus {
    border-color: var(--scf-primary-color);
    box-shadow: 0 0 0 2px rgba(59, 89, 152, 0.1);
}

.scf-input-group input::placeholder {
    color: var(--scf-placeholder-color);
    font-weight: 400;
}

#scf-submit-btn {
    margin-top: 10px;
    /* Extra space above button */
    background-color: var(--scf-primary-color);
    color: #ffffff;
    border: none;
    border-radius: var(--scf-border-radius);
    padding: 14px 20px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
    width: 100%;
}

#scf-submit-btn:hover {
    background-color: #2d4373;
    /* Darker shade of primary blue */
}

#scf-submit-btn:disabled {
    background-color: #a0b0d0;
    cursor: not-allowed;
}

/* -----------------------------------------
    Form Messages 
 ----------------------------------------- */
#scf-form-message {
    text-align: center;
    font-size: 14px;
    margin-top: 5px;
    display: none;
    /* Hidden by default */
    padding: 10px;
    border-radius: 4px;
}

#scf-form-message.scf-success {
    display: block;
    color: #155724;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
}

#scf-form-message.scf-error {
    display: block;
    color: #721c24;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
}

/* Animation classes */
.scf-fade-in {
    animation: scfFadeIn 0.3s ease forwards;
}

.scf-fade-out {
    animation: scfFadeOut 0.3s ease forwards;
}

@keyframes scfFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes scfFadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}