/* Shared mobile styles for Tamburoteka.MFE.Organization */

/* Dark theme tokens (member/usage shared) */
:root {
   

   
}

/* Spacing */
:root {
    --mobile-header-spacer: 120px;
}

/*.mobile-header-spacer {
    height: var(--mobile-header-spacer, 120px);
}*/

/* Mobile form base */
.mobile-form-container {
   /* margin-top: var(--mobile-form-offset, 82px);*/
    padding: 16px;
    padding-bottom: 100px;
    min-height: calc(100vh - var(--mobile-form-offset, 112px));
}

/*.mobile-content {
    padding-bottom: 80px;
}*/

.mobile-tab-nav {
    display: flex;
    gap: 4px;
    padding: 8px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    margin-bottom: 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.mobile-tab-nav::-webkit-scrollbar {
    display: none;
}

.tab-btn {
    flex: 1;
    min-width: 70px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 8px;
    border: none;
    background: transparent;
    border-radius: 10px;
    font-size: 14px;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.tab-btn i {
    font-size: 18px;
}

.tab-btn span:not(.tab-badge) {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.tab-btn:active {
    transform: scale(0.95);
}

.tab-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #667eea;
    color: white;
    font-size: 10px;
    font-weight: 600;
    border-radius: 9px;
    padding: 0 4px;
}

.mobile-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    margin-bottom: 12px;
    overflow: visible;
}

.mobile-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: #f9fafb;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.mobile-section-header span {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #495057;
}

.mobile-section-header > i {
    color: #9ca3af;
    font-size: 14px;
}

.mobile-section-body {
    padding: 16px;
    border-top: 1px solid #f0f0f0;
}

.mobile-form-group {
    margin-bottom: 16px;
}

.mobile-form-group:last-child {
    margin-bottom: 0;
}

.mobile-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 6px;
}

    .mobile-form-group .form-control {
        padding: 10px 12px;
        font-size: 16px !important;
        border-radius: 8px;
        border: 1px solid #e5e7eb;
    }

.mobile-form-group .form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.mobile-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.mobile-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: white;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.mobile-list {
    background: white;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.mobile-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.mobile-list-item:last-child {
    border-bottom: none;
}

.mobile-list-item:active {
    background: #f9fafb;
}

/* Mobile view header */
.mobile-view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--bb-input-search)!important;
    border-radius: 12px;
    margin-bottom: 14px;
    box-shadow: none!important;
    border: 0px solid #e9ecef!important;
}

.mobile-view-header .text-muted {
    color: #6c757d !important;
}

.mobile-view-header strong {
    color: #667eea;
    font-weight: 700;
}

/* Toggle buttons */
.view-toggle-btns {
    display: flex;
    gap: 4px;
    background: #f8f9fa;
    padding: 4px;
    border-radius: 8px;
}

.view-toggle-btn {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1rem;
}

.view-toggle-btn:active,
.view-toggle-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

/* Card list and base card */
.mobile-cards-list,
.task-cards-container,
.inventory-cards-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mobile-card,
.task-card,
.inventory-card {
    background: white;
    border: 0px solid #e9ecef;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease;
}

.mobile-card {
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.mobile-card:active,
.task-card:active,
.inventory-card:active {
    transform: scale(0.98);
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
}

/* Card header */
.card-header-section,
.task-card-header,
.inventory-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    cursor: pointer;
    background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
    border-bottom: 1px solid #f0f0f0;
}

.task-card-header {
    justify-content: space-between;
    padding: 10px 14px;
    background: linear-gradient(135deg, rgba(134, 93, 54, 0.05) 0%, rgba(172, 137, 104, 0.08) 100%);
}

.inventory-card-header {
    gap: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, #865d36 0%, #a67c52 100%);
    color: #fff;
}

/* Pagination */
.mobile-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
    padding: 16px;
    background: white;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid #e9ecef;
}

.pagination-btn {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #495057;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

.pagination-btn:disabled {
    opacity: 0.4;
    color: #adb5bd;
    cursor: not-allowed;
}

.pagination-btn:not(:disabled):active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
    transform: scale(0.95);
}

.pagination-info {
    color: #495057;
    font-size: 1rem;
    font-weight: 600;
    min-width: 70px;
    text-align: center;
}

/* Empty state */
.mobile-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #6c757d;
    background: white;
    border-radius: 16px;
    border: 1px dashed #dee2e6;
    margin: 20px 0;
}

.mobile-empty-state i {
    font-size: 3.5rem;
    margin-bottom: 16px;
    opacity: 0.4;
    color: #667eea;
}

.mobile-empty-state p {
    margin: 0;
    font-size: 0.95rem;
    color: #6c757d;
}

/* Responsive */
@media (min-width: 992px) {
    .mobile-grid-container {
        display: none !important;
    }
}

/* Dark theme overrides */
:root[data-theme="dark"] .mobile-view-header,
[data-theme="dark"] .mobile-view-header {
    background: var(--bb-input-search) !important;
    border-color: #30363d;
}

:root[data-theme="dark"] .mobile-view-header strong,
[data-theme="dark"] .mobile-view-header strong {
    color: #a371f7;
}

:root[data-theme="dark"] .view-toggle-btns,
[data-theme="dark"] .view-toggle-btns {
    background: #21262d;
}

:root[data-theme="dark"] .view-toggle-btn,
[data-theme="dark"] .view-toggle-btn {
    color: #8b949e;
}

:root[data-theme="dark"] .view-toggle-btn.active,
[data-theme="dark"] .view-toggle-btn.active {
    background: rgba(163, 113, 247, 0.15);
    color: #a371f7;
    box-shadow: 0 0 12px rgba(163, 113, 247, 0.2);
}

:root[data-theme="dark"] .mobile-card,
[data-theme="dark"] .mobile-card {
    background: #1c2128;
    border-color: #30363d;
}

:root[data-theme="dark"] .card-header-section,
[data-theme="dark"] .card-header-section {
    background: linear-gradient(135deg, rgba(163, 113, 247, 0.05) 0%, transparent 100%);
    border-bottom-color: #30363d;
}

:root[data-theme="dark"] .mobile-pagination,
[data-theme="dark"] .mobile-pagination {
    background: none;
    border-color: #30363d;
}

:root[data-theme="dark"] .pagination-btn,
[data-theme="dark"] .pagination-btn {
    background: #21262d;
    border-color: #30363d;
    color: #e6edf3;
}

:root[data-theme="dark"] .pagination-btn:not(:disabled):active,
[data-theme="dark"] .pagination-btn:not(:disabled):active {
    background: rgba(163, 113, 247, 0.15);
    border-color: #a371f7;
    color: #a371f7;
}

:root[data-theme="dark"] .pagination-info,
[data-theme="dark"] .pagination-info {
    color: #e6edf3;
}

:root[data-theme="dark"] .mobile-empty-state,
[data-theme="dark"] .mobile-empty-state {
    background: #1c2128;
    border-color: #30363d;
}

:root[data-theme="dark"] .mobile-empty-state i,
[data-theme="dark"] .mobile-empty-state i {
    color: #a371f7;
}

:root[data-theme="dark"] .mobile-empty-state p,
[data-theme="dark"] .mobile-empty-state p {
    color: #8b949e;
}

/* Member/Usage shared dark overrides */
:root[data-theme="dark"] .mobile-results-info,
[data-theme="dark"] .mobile-results-info {
    padding: 8px 16px;
    background: var(--org-dark-bg-tertiary);
    border-radius: 8px;
    color: var(--org-dark-text-secondary);
}

:root[data-theme="dark"] .mobile-usage-card,
[data-theme="dark"] .mobile-usage-card {
    background: var(--org-dark-bg-card);
    border: 1px solid var(--org-dark-border);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25), 0 0 0 1px var(--org-dark-border-light);
}

:root[data-theme="dark"] .mobile-usage-card:active,
[data-theme="dark"] .mobile-usage-card:active {
    transform: scale(0.98);
    border-color: var(--org-dark-accent-purple);
}

:root[data-theme="dark"] .mobile-usage-name,
[data-theme="dark"] .mobile-usage-name {
    color: var(--org-dark-text-primary);
}

:root[data-theme="dark"] .mobile-usage-description,
[data-theme="dark"] .mobile-usage-description {
    color: var(--org-dark-text-secondary);
}

:root[data-theme="dark"] .mobile-usage-icon,
[data-theme="dark"] .mobile-usage-icon {
    background: linear-gradient(135deg, var(--org-dark-accent-purple) 0%, var(--org-dark-accent-blue) 100%);
}

:root[data-theme="dark"] .mobile-action-btn,
[data-theme="dark"] .mobile-action-btn {
    background: var(--org-dark-bg-tertiary);
    color: var(--org-dark-text-primary);
    border: 1px solid var(--org-dark-border);
}

:root[data-theme="dark"] .mobile-action-btn:active,
[data-theme="dark"] .mobile-action-btn:active {
    background: var(--org-dark-glow-purple);
}
