/* ================================
   PROFILE MODAL - Modern Design
   Inspired by Nike, Zara, ASOS
   ================================ */

/* Modal Overlay */
.profile-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

.profile-modal-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Modal Container */
.profile-modal {
    background: white;
    border-radius: 16px;
    max-width: 480px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Modal Header */
.profile-modal-header {
    padding: 24px 24px 0;
    position: relative;
}

.profile-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    font-size: 24px;
    color: var(--text-light);
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
}

.profile-modal-close:hover {
    background: #f1f5f9;
    color: var(--dark-color);
    transform: rotate(90deg);
}

.profile-modal-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--dark-color);
    margin: 0 40px 0 0;
}

.profile-modal-subtitle {
    font-size: 14px;
    color: var(--text-light);
    margin: 8px 0 0;
}

/* Tabs */
.profile-tabs {
    display: flex;
    gap: 0;
    margin-top: 20px;
    border-bottom: 2px solid #e2e8f0;
}

.profile-tab {
    flex: 1;
    padding: 12px 20px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    bottom: -2px;
}

.profile-tab:hover {
    color: var(--dark-color);
}

.profile-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* Modal Body */
.profile-modal-body {
    padding: 30px 24px;
    max-height: calc(90vh - 180px);
    overflow-y: auto;
}

/* Tab Content */
.profile-tab-content {
    display: none;
    animation: fadeInContent 0.3s ease;
}

.profile-tab-content.active {
    display: block;
}

@keyframes fadeInContent {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Auth Toggle (Login/Register) */
.auth-toggle {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    padding: 4px;
    background: #f1f5f9;
    border-radius: 10px;
}

.auth-toggle-btn {
    flex: 1;
    padding: 10px;
    background: transparent;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.3s;
}

.auth-toggle-btn.active {
    background: white;
    color: var(--primary-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

/* Forms */
.profile-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-field label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-color);
}

.form-field input,
.form-field select {
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s;
    font-family: inherit;
}

.form-field input:focus,
.form-field select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-field input::placeholder {
    color: #94a3b8;
}

/* Checkbox */
.form-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0;
}

.form-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.form-checkbox label {
    font-size: 14px;
    color: var(--text-color);
    cursor: pointer;
    user-select: none;
}

/* Buttons */
.profile-btn {
    padding: 14px 24px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.profile-btn-primary {
    background: var(--primary-color);
    color: white;
    width: 100%;
}

.profile-btn-primary:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.profile-btn-secondary {
    background: white;
    color: var(--text-color);
    border: 2px solid #e2e8f0;
    width: 100%;
}

.profile-btn-secondary:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.profile-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* Divider */
.profile-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0;
    color: var(--text-light);
    font-size: 14px;
}

.profile-divider::before,
.profile-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

/* Guest Checkout Box */
.guest-checkout-box {
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    padding: 20px;
    border-radius: 12px;
    border: 2px solid #bae6fd;
    margin-top: 20px;
}

.guest-checkout-box h4 {
    margin: 0 0 8px;
    font-size: 16px;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.guest-checkout-box p {
    margin: 0 0 16px;
    font-size: 14px;
    color: var(--text-color);
    line-height: 1.5;
}

/* Benefits List */
.profile-benefits {
    background: #f8fafc;
    padding: 16px;
    border-radius: 8px;
    margin-top: 16px;
}

.profile-benefits h4 {
    margin: 0 0 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--dark-color);
}

.profile-benefits ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.profile-benefits li {
    font-size: 13px;
    color: var(--text-color);
    padding: 6px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-benefits li::before {
    content: '✓';
    color: #22c55e;
    font-weight: bold;
    font-size: 16px;
}

/* Track Order Section */
.track-order-input {
    display: flex;
    gap: 8px;
}

.track-order-input input {
    flex: 1;
}

.track-order-result {
    margin-top: 20px;
    padding: 16px;
    border-radius: 8px;
    background: #f8fafc;
    display: none;
}

.track-order-result.show {
    display: block;
    animation: fadeInContent 0.3s ease;
}

/* Contact Info */
.contact-info-box {
    background: #f8fafc;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

.contact-info-box h4 {
    margin: 0 0 12px;
    font-size: 16px;
    font-weight: 600;
    color: var(--dark-color);
}

.contact-info-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    font-size: 14px;
    color: var(--text-color);
}

.contact-info-item i {
    color: var(--primary-color);
    width: 20px;
    text-align: center;
}

/* Link */
.profile-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
}

.profile-link:hover {
    text-decoration: underline;
}

/* Error/Success Messages */
.form-message {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 16px;
    display: none;
}

.form-message.show {
    display: block;
    animation: fadeInContent 0.3s ease;
}

.form-message.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.form-message.success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

.form-message.loading {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

/* Responsive */
@media (max-width: 768px) {
    .profile-modal {
        margin: 0;
        border-radius: 16px 16px 0 0;
        max-height: 95vh;
    }

    .profile-modal-header {
        padding: 20px 20px 0;
    }

    .profile-modal-title {
        font-size: 24px;
    }

    .profile-modal-body {
        padding: 24px 20px;
    }

    .auth-toggle-btn {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .profile-tab {
        padding: 10px 12px;
        font-size: 14px;
    }
}
