/* Profile Modal Styles */

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.is-active {
    opacity: 1;
    visibility: visible;
}

/* Modal Container */
.profile-modal {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.is-active .profile-modal {
    transform: scale(1) translateY(0);
}

/* Modal Header */
.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: white;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transform: rotate(90deg);
}

.modal-close:focus {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
}

/* Progress Indicator */
.progress-container {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.progress-line {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-50%);
    z-index: 0;
}

.progress-line-active {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    transition: width 0.3s ease;
    border-radius: 1px;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    z-index: 1;
}

.step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(30, 30, 30, 0.95);
    border: 2px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 600;
    transition: all 0.3s ease;
}

.progress-step.is-active .step-circle {
    background: #6366f1;
    border-color: #6366f1;
    color: white;
    transform: scale(1.1);
}

.progress-step.is-completed .step-circle {
    background: #10b981;
    border-color: #10b981;
    color: white;
}

.progress-step.is-completed .step-circle::after {
    content: '✓';
    position: absolute;
    font-size: 1.2rem;
}

.step-label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    white-space: nowrap;
    transition: color 0.3s ease;
}

.progress-step.is-active .step-label,
.progress-step.is-completed .step-label {
    color: white;
}

/* Modal Body */
.modal-body {
    padding: 1.5rem;
    max-height: calc(90vh - 250px);
    overflow-y: auto;
}

/* Custom Scrollbar */
.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Form Styles */
.form-step {
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.field {
    margin-bottom: 1.5rem;
}

.label {
    color: white;
    font-weight: 500;
    margin-bottom: 0.5rem;
    display: block;
}

.required {
    color: #ef4444;
}

.input,
.select select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.75rem 1rem;
    padding-left: 2.5rem;
    border-radius: 8px;
    width: 100%;
    transition: all 0.3s ease;
}

.input:focus,
.select select:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: #6366f1;
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.input.is-danger,
.select.is-danger select {
    border-color: #ef4444;
}

.input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* Select dropdown styling */
.select {
    position: relative;
}

.select::after {
    border-color: white;
    right: 1.125em;
    z-index: 4;
}

.select select {
    cursor: pointer;
    padding-right: 2.5em;
}

.select select option {
    background: #1a1a1a;
    color: white;
}

/* Icon styling */
.control.has-icons-left .icon {
    color: rgba(255, 255, 255, 0.5);
    height: 100%;
    pointer-events: none;
    position: absolute;
    top: 0;
    width: 2.5rem;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Radio buttons */
.radio {
    color: white;
    margin-right: 1rem;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.radio input[type="radio"] {
    margin-right: 0.5rem;
    cursor: pointer;
}

/* Help text */
.help {
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.help.is-danger {
    color: #ef4444;
}

/* Location Suggestions */
.location-suggestions {
    background: rgba(30, 30, 30, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    margin-top: 0.5rem;
    max-height: 200px;
    overflow-y: auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.suggestion-item {
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: white;
    cursor: pointer;
    transition: background 0.2s ease;
}

.suggestion-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.suggestion-item i {
    color: #6366f1;
}

/* Modal Footer */
.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-footer .buttons {
    display: flex;
    gap: 0.75rem;
}

/* Button Styles */
.button {
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 44px;
}

.button.is-ghost {
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
}

.button.is-ghost:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.button.is-light {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.button.is-light:hover {
    background: rgba(255, 255, 255, 0.15);
}

.button.is-primary {
    background: #6366f1;
    color: white;
}

.button.is-primary:hover {
    background: #7c7ff3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.button.is-success {
    background: #10b981;
    color: white;
}

.button.is-success:hover {
    background: #0ea26e;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.button:focus {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .profile-modal {
        max-width: 95%;
        margin: 0 auto;
    }

    .modal-header {
        padding: 1rem;
    }

    .modal-title {
        font-size: 1.25rem;
    }

    .modal-body {
        padding: 1rem;
        max-height: calc(90vh - 200px);
    }

    .progress-step {
        gap: 0.25rem;
    }

    .step-circle {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }

    .step-label {
        font-size: 0.75rem;
    }

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

    .modal-footer .buttons {
        width: 100%;
        justify-content: space-between;
    }

    .button {
        flex: 1;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .modal-overlay,
    .profile-modal,
    .form-step,
    .button {
        transition: none;
    }

    @keyframes slideIn {
        from, to {
            opacity: 1;
            transform: none;
        }
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .modal-close,
    .input,
    .select select {
        border-width: 2px;
    }

    .button:focus,
    .input:focus,
    .select select:focus {
        outline-width: 3px;
    }
}