/* Container */
[class^="form-container-"] {
    font-family: 'Arial', sans-serif;
    max-width: 500px;
    width: 100%;
}

/* Form box */
[class^="contact-form-"] {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

[class^="contact-form-"] h2 {
    text-align: center;
    margin-bottom: 5px;
    margin-top: 5px;
    color: black;
    font-size: 28px;
}

/* Form groups */
[class^="form-group-"] {
    margin-bottom: 25px;
    position: relative;
}

[class^="form-group-"] label {
    position: absolute;
    top: -11px;
    left: 25px;
    z-index: 1;
    display: block;
    margin-bottom: 4px;
    font-weight: bold;
    color: black;
    padding: 1px 5px;
    border-radius: 10px;
    background-color: white;
}

[class^="form-group-"] input,
[class^="form-group-"] textarea,
[class^="form-group-"] select {
    width: 100%;
    padding: 16px 15px;
    border: 1px solid #606060;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

[class^="form-group-"] input:focus,
[class^="form-group-"] textarea:focus,
[class^="form-group-"] select:focus {
    outline: none;
    border-color: #667eea;
}

[class^="form-group-"] textarea {
    resize: vertical;
    min-height: 50px;
    height: 70px;
}

/* Mobile input container */
[class^="mobile-input-container-"] {
    display: flex;
    gap: 0;
    align-items: stretch;
}

[class^="country-select-wrapper-"] {
    flex: 0 0 140px;
    position: relative;
}

[class^="country-select-wrapper-"] select {
    width: 100%;
    border-radius: 5px 0 0 5px;
    border-right: none;
    appearance: none;
    background-color: #f8f9fa;
    cursor: pointer;
    padding-right: 30px;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 8px center;
    background-repeat: no-repeat;
    background-size: 16px;
}

[class^="country-select-wrapper-"] select:focus {
    border-right: none;
}

[class^="mobile-input-container-"] input[type="tel"] {
    flex: 1;
    border-radius: 0 5px 5px 0;
    border-left: none;
}

[class^="mobile-input-container-"] input[type="tel"]:focus {
    border-left: 2px solid #667eea;
}

/* Form help text */
[class^="form-help-"] {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 12px;
}

/* Submit button */
button[type="submit"] {
    width: 100%;
    background: rgba(128, 128, 128, 0.464);
    color: black;
    padding: 15px;
    border: 2px solid grey;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

button[type="submit"]:hover {
    transform: translateY(-2px);
}

button[type="submit"]:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Loader */
.loader {
    width: 20px;
    height: 20px;
    border: 2px solid #ffffff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Response messages */
[class^="response-message-"] {
    margin-top: 20px;
    padding: 15px;
    border-radius: 5px;
    text-align: center;
    font-weight: bold;
    display: none;
}

[class^="response-message-"].success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

[class^="response-message-"].error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Modal overlay + panel */
#cf-modal { z-index: 9999; position: fixed; inset: 0; display: none; align-items:center; justify-content:center; }
#cf-modal .cf-modal-overlay { position:absolute; inset:0; background: rgba(0,0,0,0.45); }
#cf-modal .cf-modal-wrap { position: relative; width: 95%; max-width: 640px; margin: 30px; z-index: 2; margin: 50px auto; }
#cf-modal .cf-modal-body { background: #fff; border-radius: 8px; padding: 18px; box-shadow: 0 10px 40px rgba(0,0,0,0.2); max-height: 85vh; overflow:auto; }
#cf-modal .cf-modal-close { position: absolute; right: -8px; top: -8px; background: #fff; border: none; font-size: 22px; line-height: 1; width:40px; height:40px; border-radius:50%; cursor:pointer; box-shadow:0 2px 8px rgba(0,0,0,0.1); color: black; padding: 5px 7px; }


/* Responsive */
@media (max-width: 600px) {
    [class^="contact-form-"] {
        padding: 20px;
    }

    [class^="contact-form-"] h2 {
        font-size: 24px;
    }

    [class^="mobile-input-container-"] {
        flex-direction: row;
        gap: 10px;
    }

    [class^="country-select-wrapper-"] {
        flex: 1;
    }

    [class^="country-select-wrapper-"] select,
    [class^="mobile-input-container-"] input[type="tel"] {
        border-radius: 5px;
        border: 2px solid #ddd;
    }

    [class^="country-select-wrapper-"] select:focus,
    [class^="mobile-input-container-"] input[type="tel"]:focus {
        border: 2px solid #667eea;
    }
}
