/**
 * CURE BATUMI - Registration Popup Styles
 */

.registration-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.popup-content {
    position: relative;
    background-color: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: popupSlideIn 0.3s ease-out;
}

@keyframes popupSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 24px 16px;
    border-bottom: 1px solid #e5e7eb;
}

.popup-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.popup-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background-color: transparent;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
}

.popup-close:hover {
    background-color: #f3f4f6;
}

.popup-close img {
    width: 16px;
    height: 16px;
}

.popup-form {
    padding: 24px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group:last-of-type {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: #2196f3;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

.form-input::placeholder {
    color: #9ca3af;
}

/* Phone Input with Country Code */
.phone-input-wrapper {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.country-code-selector {
    position: relative;
    flex-shrink: 0;
}

.country-code-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 12px;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 16px;
    color: #374151;
    font-weight: 500;
    min-width: 110px;
}

.country-code-btn:hover {
    border-color: #2196f3;
    background-color: #f0f9ff;
}

.country-code-btn svg {
    width: 12px;
    height: 8px;
    transition: transform 0.2s;
}

.country-code-btn.active svg {
    transform: rotate(180deg);
}

.flag-icon {
    width: 24px;
    height: 18px;
    object-fit: cover;
    border-radius: 2px;
    flex-shrink: 0;
}

.country-code-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    width: 280px;
    max-height: 300px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.country-code-search {
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.country-code-search input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
}

.country-code-search input:focus {
    outline: none;
    border-color: #2196f3;
}

.country-code-list {
    overflow-y: auto;
    max-height: 240px;
}

.country-code-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.country-code-item:hover {
    background-color: #f0f9ff;
}

.country-code-item.selected {
    background-color: #e0f2fe;
}

.country-name {
    flex: 1;
    font-size: 14px;
    color: #374151;
}

.country-dial-code {
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
}

.phone-number-input {
    flex: 1;
}

.course-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.course-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.course-option:hover {
    border-color: #2196f3;
    background-color: #f0f9ff;
}

.course-option input[type="radio"] {
    display: none;
}

.course-option input[type="radio"]:checked + .radio-custom {
    border-color: #2196f3;
    background-color: #2196f3;
}

.course-option input[type="radio"]:checked + .radio-custom::after {
    opacity: 1;
    transform: scale(1);
}

.course-option input[type="radio"]:checked ~ .course-name {
    color: #2196f3;
    font-weight: 600;
}

.radio-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5db;
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
    transition: all 0.2s;
}

.radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 8px;
    height: 8px;
    background-color: #ffffff;
    border-radius: 50%;
    opacity: 0;
    transition: all 0.2s;
}

.course-name {
    font-size: 15px;
    color: #374151;
    transition: all 0.2s;
}

.form-actions {
    margin-top: 24px;
}

.btn-block {
    width: 100%;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
}


/* Mobile Responsive - Full Screen */
@media (max-width: 768px) {
    .registration-popup {
        padding: 0;
        align-items: flex-start;
        overflow-y: auto;
    }
    
    .popup-content {
        width: 100vw;
        min-height: 100vh;
        max-width: 100vw;
        max-height: none;
        border-radius: 0;
        animation: none;
    }

    .popup-header {
        padding: 20px;
    }
    
    .popup-header h2 {
        font-size: 20px;
    }
    
    .popup-form {
        padding: 20px;
    }
}

/* Prevent body scroll when popup is open */
body.popup-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

/* Loading State */
.popup-form.loading {
    opacity: 0.6;
    pointer-events: none;
}

.popup-form.loading .btn-primary {
    position: relative;
}

.popup-form.loading .btn-primary::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-right-color: transparent;
    animation: spin 0.6s linear infinite;
}

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