/* Trial Form Styling */
.trial-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    /* Hidden by default */
    justify-content: center;
    align-items: center;
    z-index: 9999;
    padding: 20px;
    backdrop-filter: blur(5px);
}

@media (max-width: 640px) {
    .trial-modal-overlay {
        padding: 10px;
    }
}

.trial-modal-content {
    background: #fff;
    width: 100%;
    max-width: 800px;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease-out;
}

@media (max-width: 640px) {
    .trial-modal-content {
        border-radius: 12px;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.trial-form-header {
    background: #f8fafc;
    padding: 24px 32px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.trial-form-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: #1e293b;
    font-weight: 700;
}

.close-trial-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #64748b;
    transition: color 0.2s;
}

.close-trial-modal:hover {
    color: #1e293b;
}

.trial-form-body {
    padding: 32px;
}

.registration-form {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

@media (max-width: 800px) {
    .registration-form {
        grid-template-columns: 1fr;
    }
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group.full-width {
    grid-column: span 2;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #475569;
}

.form-group input,
.form-group select {
    padding: 12px 16px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #16cba7;
    box-shadow: 0 0 0 3px rgba(22, 203, 167, 0.1);
}

.form-group input.is-invalid {
    border-color: #ef4444;
}

.phone-input-wrapper {
    display: flex;
    gap: 12px;
}

.country-code-field {
    width: 80px;
    background: #f1f5f9;
    color: #64748b;
    font-weight: 600;
    text-align: center;
}

.phone-number-field {
    flex: 1;
}

.captcha-wrapper {
    display: flex;
    gap: 12px;
    align-items: center;
    background: #f8fafc;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    flex-wrap: wrap;
}

.captcha-wrapper input {
    flex: 1;
    min-width: 100px;
}

.captcha-image-placeholder {
    background: #fff;
    border: 1px solid #cbd5e1;
    height: 40px;
    width: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Courier New', Courier, monospace;
    font-weight: bold;
    letter-spacing: 5px;
    font-style: italic;
    user-select: none;
}

.refresh-captcha-btn {
    background: none;
    border: none;
    color: #16cba7;
    cursor: pointer;
    font-size: 1.2rem;
    transition: transform 0.3s;
}

.refresh-captcha-btn:hover {
    transform: rotate(180deg);
}

.form-submit-wrapper {
    grid-column: span 2;
    margin-top: 20px;
}

.btn-submit-trial {
    width: 100%;
    padding: 14px;
    background: #16cba7;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1.125rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-submit-trial:hover {
    background: #12a88a;
}

/* Searchable Select Styling */
.searchable-select {
    position: relative;
    width: 100%;
}

.searchable-select input[type="text"] {
    width: 100%;
    padding: 12px 16px;
    padding-right: 40px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
}

.searchable-select input[type="text"]:focus {
    outline: none;
    border-color: #16cba7;
    box-shadow: 0 0 0 3px rgba(22, 203, 167, 0.1);
}

.searchable-options {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    width: 100%;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    max-height: 250px;
    overflow-y: auto;
    z-index: 100;
    display: none;
}

.searchable-options.active {
    display: block;
}

.option-group-label {
    padding: 8px 16px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    background: #f8fafc;
    position: sticky;
    top: 0;
}

.searchable-option {
    padding: 10px 16px;
    font-size: 0.95rem;
    color: #334155;
    cursor: pointer;
    transition: background 0.2s;
}

.searchable-option:hover {
    background: #f1f5f9;
    color: #16cba7;
}

.searchable-option.no-results {
    color: #94a3b8;
    font-style: italic;
    cursor: default;
}

.searchable-option.no-results:hover {
    background: none;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .registration-form {
        grid-template-columns: 1fr;
    }

    .form-group.full-width {
        grid-column: span 1;
    }

    .form-submit-wrapper {
        grid-column: span 1;
    }

    .phone-input-wrapper {
        flex-wrap: wrap;
    }

    .country-code-field {
        width: 100%;
        text-align: left;
    }

    .trial-form-body {
        padding: 20px;
    }

    .trial-form-header {
        padding: 16px 20px;
    }

    .trial-form-header h2 {
        font-size: 1.25rem;
    }

    .form-group label {
        font-size: 0.8125rem;
    }
}