/* ========================================
   PROFILE PAGE RESPONSIVE
   ======================================== */

/* ===== PROFILE NAVBAR MOBILE ===== */
@media (max-width: 1023px) {
    .navbar .flex {
        padding: 0.75rem 1rem !important;
    }
    
    .navbar .logo-img {
        width: 40px !important;
        height: 40px !important;
    }
    
    .navbar .logo-text {
        font-size: 1.25rem !important;
    }
    
    .navbar button,
    .navbar a {
        padding: 0.5rem 0.75rem !important;
        font-size: 0.875rem !important;
    }
    
    .navbar button svg,
    .navbar a svg {
        width: 1rem !important;
        height: 1rem !important;
    }
}

@media (max-width: 767px) {
    .navbar .flex {
        flex-wrap: wrap !important;
        gap: 0.5rem !important;
    }
    
    .navbar .logo {
        width: 100% !important;
        justify-content: center !important;
        margin-bottom: 0.5rem !important;
    }
    
    .navbar .flex.items-center.space-x-2,
    .navbar .flex.items-center.space-x-3 {
        width: 100% !important;
        justify-content: center !important;
        flex-wrap: wrap !important;
        gap: 0.5rem !important;
        margin: 0 !important;
    }
    
    .navbar button,
    .navbar a {
        flex: 1 1 auto !important;
        min-width: 0 !important;
        padding: 0.625rem 0.75rem !important;
        font-size: 0.8rem !important;
    }
    
    .navbar button span,
    .navbar a span {
        display: none !important;
    }
    
    .navbar button svg,
    .navbar a svg {
        margin: 0 !important;
    }
}

@media (max-width: 479px) {
    .navbar .logo-text {
        font-size: 1.1rem !important;
    }
    
    .navbar button,
    .navbar a {
        padding: 0.5rem !important;
        min-width: 44px !important;
    }
}

/* ===== PROFILE CONTAINER MOBILE ===== */
@media (max-width: 1023px) {
    .profile-container {
        padding: 1rem !important;
        max-width: 100% !important;
    }
    
    .profile-header {
        flex-direction: column !important;
        text-align: center !important;
        gap: 1.5rem !important;
        padding: 1.5rem 1rem !important;
    }
    
    .profile-avatar {
        width: 100px !important;
        height: 100px !important;
        margin: 0 auto !important;
    }
    
    .profile-info {
        align-items: center !important;
    }
    
    .profile-name {
        font-size: 1.5rem !important;
    }
    
    .profile-email {
        font-size: 0.9rem !important;
    }
    
    .profile-stats {
        justify-content: center !important;
        gap: 1rem !important;
    }
    
    .stat-item {
        padding: 0.75rem 1rem !important;
    }
    
    .stat-value {
        font-size: 1.5rem !important;
    }
    
    .stat-label {
        font-size: 0.8rem !important;
    }
}

/* ===== PROFILE TABS MOBILE ===== */
@media (max-width: 767px) {
    .profile-tabs {
        flex-direction: column !important;
        gap: 0.5rem !important;
    }
    
    .tab-button {
        width: 100% !important;
        justify-content: flex-start !important;
        padding: 0.875rem 1rem !important;
        font-size: 0.9rem !important;
    }
    
    .tab-button svg {
        width: 1.25rem !important;
        height: 1.25rem !important;
    }
}

/* ===== PROFILE CONTENT MOBILE ===== */
@media (max-width: 767px) {
    .profile-section {
        padding: 1.5rem 1rem !important;
        border-radius: 12px !important;
    }
    
    .section-title {
        font-size: 1.3rem !important;
        margin-bottom: 1rem !important;
    }
    
    .profile-field {
        margin-bottom: 1rem !important;
    }
    
    .field-label {
        font-size: 0.85rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .field-value,
    .field-input {
        font-size: 0.9rem !important;
        padding: 0.75rem !important;
    }
    
    .btn-edit,
    .btn-save,
    .btn-cancel {
        padding: 0.75rem 1.25rem !important;
        font-size: 0.9rem !important;
    }
}

/* ===== APPOINTMENTS LIST MOBILE ===== */
@media (max-width: 767px) {
    .appointments-list {
        gap: 1rem !important;
    }
    
    .appointment-card {
        padding: 1.25rem 1rem !important;
        border-radius: 12px !important;
    }
    
    .appointment-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.75rem !important;
    }
    
    .appointment-date {
        font-size: 1.1rem !important;
    }
    
    .appointment-time {
        font-size: 0.85rem !important;
    }
    
    .appointment-status {
        font-size: 0.75rem !important;
        padding: 0.35rem 0.75rem !important;
    }
    
    .appointment-details {
        gap: 0.5rem !important;
        margin-top: 0.75rem !important;
    }
    
    .detail-item {
        font-size: 0.85rem !important;
    }
    
    .appointment-actions {
        flex-direction: column !important;
        gap: 0.5rem !important;
        margin-top: 1rem !important;
    }
    
    .appointment-actions button {
        width: 100% !important;
        padding: 0.75rem !important;
        font-size: 0.85rem !important;
    }
}

/* ===== SUBSCRIPTION INFO MOBILE ===== */
@media (max-width: 767px) {
    .subscription-card {
        padding: 1.5rem 1rem !important;
        border-radius: 12px !important;
    }
    
    .subscription-header {
        flex-direction: column !important;
        text-align: center !important;
        gap: 1rem !important;
    }
    
    .subscription-plan {
        font-size: 1.5rem !important;
    }
    
    .subscription-price {
        font-size: 1.25rem !important;
    }
    
    .subscription-features {
        gap: 0.75rem !important;
        margin-top: 1rem !important;
    }
    
    .feature-item {
        font-size: 0.85rem !important;
        padding: 0.5rem 0 !important;
    }
    
    .subscription-actions {
        flex-direction: column !important;
        gap: 0.75rem !important;
        margin-top: 1.5rem !important;
    }
    
    .subscription-actions button {
        width: 100% !important;
        padding: 0.875rem !important;
        font-size: 0.9rem !important;
    }
}

/* ===== PAYMENT HISTORY MOBILE ===== */
@media (max-width: 767px) {
    .payment-history {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    .payment-table {
        min-width: 600px !important;
    }
    
    .payment-table th,
    .payment-table td {
        padding: 0.75rem 0.5rem !important;
        font-size: 0.85rem !important;
    }
    
    .payment-table th {
        font-size: 0.8rem !important;
    }
}

/* ===== PROFILE SETTINGS MOBILE ===== */
@media (max-width: 767px) {
    .settings-group {
        margin-bottom: 1.5rem !important;
    }
    
    .settings-title {
        font-size: 1.1rem !important;
        margin-bottom: 1rem !important;
    }
    
    .setting-item {
        padding: 1rem !important;
        border-radius: 10px !important;
    }
    
    .setting-label {
        font-size: 0.9rem !important;
    }
    
    .setting-description {
        font-size: 0.8rem !important;
    }
    
    .toggle-switch {
        width: 48px !important;
        height: 26px !important;
    }
    
    .toggle-slider {
        width: 20px !important;
        height: 20px !important;
    }
}

/* ===== PROFILE CARDS MOBILE ===== */
@media (max-width: 767px) {
    .profile-card {
        padding: 1.25rem 1rem !important;
        border-radius: 12px !important;
        margin-bottom: 1rem !important;
    }
    
    .card-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.75rem !important;
        margin-bottom: 1rem !important;
    }
    
    .card-title {
        font-size: 1.2rem !important;
    }
    
    .card-subtitle {
        font-size: 0.85rem !important;
    }
    
    .card-content {
        font-size: 0.9rem !important;
    }
    
    .card-actions {
        flex-direction: column !important;
        gap: 0.5rem !important;
        margin-top: 1rem !important;
    }
    
    .card-actions button {
        width: 100% !important;
    }
}

/* ===== PROFILE FORMS MOBILE ===== */
@media (max-width: 767px) {
    .profile-form {
        padding: 1.5rem 1rem !important;
    }
    
    .form-row {
        flex-direction: column !important;
        gap: 1rem !important;
    }
    
    .form-group {
        width: 100% !important;
    }
    
    .form-label {
        font-size: 0.85rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .form-input,
    .form-select,
    .form-textarea {
        font-size: 0.9rem !important;
        padding: 0.75rem !important;
    }
    
    .form-helper {
        font-size: 0.75rem !important;
        margin-top: 0.35rem !important;
    }
    
    .form-error {
        font-size: 0.75rem !important;
    }
    
    .form-actions {
        flex-direction: column-reverse !important;
        gap: 0.75rem !important;
        margin-top: 1.5rem !important;
    }
    
    .form-actions button {
        width: 100% !important;
        padding: 0.875rem !important;
    }
}

/* ===== PROFILE MODALS MOBILE ===== */
@media (max-width: 767px) {
    .profile-modal {
        padding: 1rem !important;
    }
    
    .modal-content {
        max-width: 95% !important;
        padding: 1.5rem 1rem !important;
        border-radius: 12px !important;
    }
    
    .modal-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.75rem !important;
        margin-bottom: 1.25rem !important;
    }
    
    .modal-title {
        font-size: 1.3rem !important;
    }
    
    .modal-close {
        position: absolute !important;
        top: 1rem !important;
        right: 1rem !important;
        width: 32px !important;
        height: 32px !important;
    }
    
    .modal-body {
        font-size: 0.9rem !important;
    }
    
    .modal-footer {
        flex-direction: column-reverse !important;
        gap: 0.75rem !important;
        margin-top: 1.5rem !important;
    }
    
    .modal-footer button {
        width: 100% !important;
    }
}

/* ===== PROFILE ALERTS MOBILE ===== */
@media (max-width: 767px) {
    .alert {
        padding: 1rem !important;
        border-radius: 10px !important;
        font-size: 0.85rem !important;
    }
    
    .alert-icon {
        width: 1.25rem !important;
        height: 1.25rem !important;
    }
    
    .alert-title {
        font-size: 0.9rem !important;
    }
    
    .alert-message {
        font-size: 0.8rem !important;
    }
}

/* ===== PROFILE BADGES MOBILE ===== */
@media (max-width: 767px) {
    .badge {
        font-size: 0.75rem !important;
        padding: 0.35rem 0.75rem !important;
    }
    
    .badge-icon {
        width: 0.875rem !important;
        height: 0.875rem !important;
    }
}

/* ===== PROFILE NAVIGATION MOBILE ===== */
@media (max-width: 767px) {
    .profile-nav {
        position: sticky !important;
        top: 64px !important;
        z-index: 40 !important;
        background: rgba(10, 10, 10, 0.95) !important;
        backdrop-filter: blur(10px) !important;
        padding: 0.75rem 1rem !important;
        margin: -1rem -1rem 1rem -1rem !important;
    }
    
    .profile-nav-links {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        display: flex !important;
        gap: 0.5rem !important;
        padding-bottom: 0.5rem !important;
    }
    
    .profile-nav-link {
        white-space: nowrap !important;
        padding: 0.5rem 1rem !important;
        font-size: 0.85rem !important;
    }
}

/* ===== PROFILE GRID MOBILE ===== */
@media (max-width: 767px) {
    .profile-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    
    .profile-grid-item {
        padding: 1rem !important;
    }
}

/* ===== PROFILE EMPTY STATE MOBILE ===== */
@media (max-width: 767px) {
    .empty-state {
        padding: 2rem 1rem !important;
        text-align: center !important;
    }
    
    .empty-state-icon {
        width: 64px !important;
        height: 64px !important;
        margin: 0 auto 1rem !important;
    }
    
    .empty-state-title {
        font-size: 1.2rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .empty-state-message {
        font-size: 0.85rem !important;
        margin-bottom: 1.5rem !important;
    }
    
    .empty-state-action {
        width: 100% !important;
        max-width: 280px !important;
        margin: 0 auto !important;
    }
}

/* ===== PROFILE LOADING STATE MOBILE ===== */
@media (max-width: 767px) {
    .loading-skeleton {
        height: 100px !important;
        border-radius: 10px !important;
    }
    
    .loading-text {
        height: 16px !important;
        border-radius: 4px !important;
    }
}

/* ===== PROFILE TOOLTIPS MOBILE ===== */
@media (max-width: 767px) {
    .tooltip {
        font-size: 0.75rem !important;
        padding: 0.5rem 0.75rem !important;
        max-width: 200px !important;
    }
}

/* ===== PROFILE DROPDOWN MOBILE ===== */
@media (max-width: 767px) {
    .dropdown-menu {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        top: auto !important;
        transform: none !important;
        border-radius: 16px 16px 0 0 !important;
        max-height: 70vh !important;
        overflow-y: auto !important;
    }
    
    .dropdown-item {
        padding: 1rem !important;
        font-size: 0.9rem !important;
    }
}

/* ===== PROFILE BACK BUTTON MOBILE ===== */
@media (max-width: 767px) {
    .back-button {
        position: fixed !important;
        bottom: 1rem !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        z-index: 50 !important;
        padding: 0.875rem 1.5rem !important;
        font-size: 0.9rem !important;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5) !important;
    }
}

/* ===== PROFILE SCROLL IMPROVEMENTS ===== */
@media (max-width: 767px) {
    .profile-content {
        padding-bottom: 5rem !important;
    }
    
    .profile-section:last-child {
        margin-bottom: 2rem !important;
    }
}

/* ===== PROFILE TOUCH IMPROVEMENTS ===== */
@media (max-width: 767px) {
    .profile-button,
    .profile-link {
        min-height: 44px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .profile-input {
        min-height: 44px !important;
    }
}
