/* =====================================================
   MEMBERSHIP APPLICATION - Custom Styles
   ===================================================== */

/* Form Error States */
.form-group.error input,
.form-group.error select,
.form-group.error textarea {
    border-color: #ef4444 !important;
    animation: shake 0.5s ease;
}

.form-group .error-message {
    display: block;
    margin-top: 0.5rem;
}

/* Focus States */
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #0f70bf !important;
    box-shadow: 0 0 20px rgba(15, 112, 191, 0.15);
}

/* Custom Radio Box Design */
.membership-radio-card {
    display: block;
}

.membership-radio-card input[type="radio"]:checked ~ .radio-card-content {
    border-color: #0f70bf;
    background: rgba(15, 112, 191, 0.05);
    box-shadow: 0 4px 20px rgba(15, 112, 191, 0.15);
}

.membership-radio-card:hover .radio-card-content {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.membership-radio-card input[type="radio"]:checked ~ .radio-card-content .radio-circle {
    border-color: #0f70bf;
    background: #0f70bf;
}

.radio-circle {
    position: relative;
}

.membership-radio-card input[type="radio"]:checked ~ .radio-card-content .radio-circle::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: white;
}

/* Terms & Conditions Modal */
.tos-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: modalFadeIn 0.3s ease forwards;
    cursor: default;
}

.tos-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
}

.tos-modal-content {
    position: relative;
    width: 90%;
    max-width: 700px;
    max-height: 80vh;
    background: #1e293b;
    border: 1px solid rgba(15, 112, 191, 0.3);
    border-radius: 16px;
    overflow: hidden;
    animation: modalScaleIn 0.3s ease forwards;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    cursor: default;
}

.tos-modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(15, 112, 191, 0.2);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.tos-modal-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin: 0;
}

.tos-modal-close {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(15, 112, 191, 0.1);
    border: 1px solid rgba(15, 112, 191, 0.2);
    color: #0f70bf;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.tos-modal-close:hover {
    background: rgba(15, 112, 191, 0.2);
    border-color: #0f70bf;
}

.tos-modal-body {
    padding: 2rem;
    max-height: 50vh;
    overflow-y: auto;
    color: #cbd5e1;
    line-height: 1.8;
    cursor: default;
}

.tos-modal-body::-webkit-scrollbar {
    width: 8px;
}

.tos-modal-body::-webkit-scrollbar-track {
    background: rgba(15, 112, 191, 0.1);
    border-radius: 4px;
}

.tos-modal-body::-webkit-scrollbar-thumb {
    background: rgba(15, 112, 191, 0.4);
    border-radius: 4px;
}

.tos-modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(15, 112, 191, 0.6);
}

.tos-modal-body h4 {
    color: white;
    font-size: 1.125rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.tos-modal-body h4:first-child {
    margin-top: 0;
}

.tos-modal-body p {
    margin-bottom: 1rem;
}

.tos-modal-body ul {
    list-style: disc;
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.tos-modal-body ul li {
    margin-bottom: 0.5rem;
}

.tos-modal-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid rgba(15, 112, 191, 0.2);
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    background: rgba(15, 112, 191, 0.05);
}

.tos-modal-footer button {
    padding: 0.75rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.tos-modal-footer .btn-reject {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.tos-modal-footer .btn-reject:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
}

.tos-modal-footer .btn-accept {
    background: #0f70bf;
    color: white;
    border: 1px solid #0f70bf;
}

.tos-modal-footer .btn-accept:hover:not(:disabled) {
    background: #0a5a9c;
    border-color: #0a5a9c;
}

.tos-modal-footer .btn-accept:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 40px;
    background: linear-gradient(to top, rgba(30, 41, 59, 1), transparent);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.scroll-indicator.hidden {
    opacity: 0;
}

.scroll-indicator svg {
    width: 20px;
    height: 20px;
    color: #0f70bf;
    animation: bounce 1.5s infinite;
}

/* Animations */
@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes modalScaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes modalFadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

@keyframes modalScaleOut {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.9);
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-10px);
    }
    75% {
        transform: translateX(10px);
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

/* Loading Spinner */
.spinner {
    animation: spin 1s linear infinite;
}

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

/* Checkbox styling enhancement */
#is_tos_accepted:checked + label > div {
    background: #0f70bf;
    border-color: #0f70bf;
}

#is_tos_accepted:checked + label svg {
    display: block !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .tos-modal-content {
        width: 95%;
        max-height: 85vh;
    }

    .tos-modal-header {
        padding: 1rem 1.5rem;
    }

    .tos-modal-body {
        padding: 1.5rem;
        max-height: 55vh;
    }

    .tos-modal-footer {
        padding: 1rem 1.5rem;
        flex-direction: column;
    }

    .tos-modal-footer button {
        width: 100%;
    }

    .membership-options-grid {
        grid-template-columns: 1fr;
    }
}

/* Line clamp for bio text */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
