/* Mobile-First Wardrobe Tracker Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Bricolage Grotesque", sans-serif;
    background: white;
    color: #242020;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Mobile Container */
.mobile-container {
    width: 393px;
    height: 852px;
    margin: 0 auto;
    position: relative;
    background: white;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

/* Dynamic Island */
.dynamic-island {
    width: 122px;
    height: 36px;
    position: absolute;
    left: 135.5px;
    top: 12px;
    background: black;
    border-radius: 32px;
    z-index: 100;
}

/* Top Header */
.top-header {
    margin-top: 59px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;             
    padding: 8px 12px;
    margin-bottom: 0px;
  }
  
  .logo-text {
    font-size: 40px;
    height: 60px;
    line-height: 60px;
    margin: 0;
    display: flex;
    align-items: center;
  }
  
  .Tree {
    display: inline-flex;
    align-items: center;
    height: 55px;         
    margin-left: -25px;    
    transform: translateY(-9px); 
  }

/* Main Content */
.main-content {
    position: absolute;
    top: 140px;
    left: 0;
    right: 0;
    bottom: 120px;
    overflow-y: auto;
    padding: 0 25px;
    background: white;
    padding-bottom: 20px;
}

/* Page Title */
.page-title {
    font-size: 20px;
    font-weight: 700;
    color: #242020;
    margin: 28px 0 10px 0;
    text-align: left;
}

/* Tab Content */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Mobile Form Styles */
.mobile-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.form-section {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-label {
    font-size: 15px;
    font-weight: 600;
    color: #242020;
}

.mobile-input, .mobile-select {
    height: 33px;
    border-radius: 10px;
    padding: 0 15px;
    font-family: "Bricolage Grotesque", sans-serif;
    font-size: 15px;
    font-weight: 400;
    outline: none;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    color:rgba(0, 0, 0, 0.5);
}

.mobile-input:focus, .mobile-select:focus {
    border-color: #4AA953;
}

/* Photo Upload */
.photo-upload-mobile {
    position: relative;
    min-height: 80px;     
  }
  
  /* make the invisible input cover whatever size the frame becomes */
  .photo-upload-mobile input[type="file"] {
    position: absolute;
    inset: 0;              /* fills parent */
    opacity: 0;
    cursor: pointer;
  }
  
  .photo-preview-mobile {
    min-height: 80px;
    max-height: 250px;                     
    border: 1px dashed rgba(0,0,0,0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;                  
  }

  .photo-preview-mobile img {
    max-width: 100%;
    max-height: calc(100% - 16px); 
    width: auto;                 
    height: auto;                  
    object-fit: contain;          
    display: block;
}
  
  /* hide the placeholder once an image exists */
  .photo-preview-mobile.has-image .photo-placeholder {
    display: none;
  }

  

/* Add Button */
.add-btn {
    width: 343px;
    height: 48px;
    background: #4AA953;
    border: none;
    border-radius: 20px;
    color: white;
    font-size: 20px;
    font-weight: 700;
    font-family: "Bricolage Grotesque", sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.add-btn:hover {
    background: #3d8a47;
    transform: translateY(-2px);
}

/* Daily Log Styles */
.date-display-mobile {
    font-size: 16px;
    color: #242020;
    margin-bottom: 20px;
    text-align: center;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 10px;
}

.outfit-selector-mobile {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}
/* Filters + title on Daily Log */
.log-filters {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.log-title {
    font-weight: 700;
    font-size: 14px;
}

.filter-select.small {
    height: 34px;
}

.outfit-item-mobile {
    border: 1.5px solid rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.outfit-item-mobile:hover {
    border-color: #4AA953;
    transform: translateY(-2px);
}

.outfit-item-mobile.selected {
    border-color: #4AA953;
    background: #f0f8f0;
}

.outfit-item-mobile img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 8px;
    margin-bottom: 8px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
}

.outfit-item-mobile .item-name {
    font-size: 12px;
    font-weight: 500;
    color: #242020;
}

.selected-outfit-form{
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.selected-outfit-mobile {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.selected-outfit-mobile h3 {
    font-size: 16px;
    margin-bottom: 10px;
    color: #242020;
}

.selected-items {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.selected-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: white;
    border-radius: 15px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    font-size: 12px;
}

.selected-item img {
    width: 20px;
    height: 20px;
    object-fit: cover;
    border-radius: 50%;
}

.remove-item {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    padding: 2px;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
}

.log-btn {
    width: 343px;
    height: 48px;
    background: #4AA953;
    border: none;
    border-radius: 20px;
    color: white;
    font-size: 20px;
    font-weight: 700;
    font-family: "Bricolage Grotesque", sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.log-btn:hover {
    background: #3d8a47;
    transform: translateY(-2px);
}


/* Analytics Styles */
.stats-mobile {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.stat-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.stat-number {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: #4AA953;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 12px;
    color: #6c757d;
    font-weight: 500;
}

.chart-container-mobile {
    margin-bottom: 30px;
}

.chart-container-mobile h3 {
    font-size: 16px;
    color: #242020;
    margin-bottom: 15px;
    text-align: center;
}

.circular-chart-mobile {
    position: relative;
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.chart-svg-mobile {
    width: 150px;
    height: 150px;
    transform: rotate(-90deg);
}

.chart-center-mobile {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.chart-total {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: #4AA953;
    line-height: 1;
}

.chart-label {
    font-size: 10px;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Chart legend */
.chart-legend-mobile {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.legend-item {
    display: grid;
    grid-template-columns: 14px 1fr auto auto;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    background: #f8f9fa;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 8px;
    padding: 8px 10px;
}

.legend-color {
    width: 14px;
    height: 14px;
    border-radius: 3px;
}

.legend-text {
    color: #242020;
    font-weight: 500;
}

.legend-percent {
    color: #6c757d;
}

.legend-value {
    color: #242020;
    font-weight: 600;
}

/* Empty state for outfit selector */
.empty-state {
    grid-column: 1 / -1;
    width: 100%;
    background: #f8f9fa;
    border: 1px dashed rgba(0,0,0,0.15);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.empty-emoji {
    font-size: 28px;
    margin-bottom: 8px;
}

.empty-title {
    font-weight: 700;
    margin-bottom: 4px;
}

.empty-subtitle {
    color: #6c757d;
    font-size: 12px;
    margin-bottom: 10px;
}

.empty-cta {
    background: #4AA953;
    color: white;
    border: none;
    border-radius: 12px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}
.empty-cta:hover {
    background: #3d8a47;
    transform: translateY(-2px);
}

.rarely-used-mobile h3 {
    font-size: 16px;
    color: #242020;
    margin-bottom: 15px;
}

.rare-item-mobile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    background: white;
    border-radius: 8px;
    margin-bottom: 8px;
}

.rare-item-mobile:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.rare-item-mobile img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 6px;
}

.rare-item-info {
    flex: 1;
}

.rare-item-name {
    font-weight: 500;
    color: #242020;
    font-size: 14px;
}

.rare-item-stats {
    font-size: 12px;
    color: #6c757d;
}

/* Wardrobe Styles */
.wardrobe-filters-mobile {
    margin-bottom: 20px;
}

.filter-select {
    width: 100%;
    height: 40px;
    border: 2px solid rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    padding: 0 15px;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    background: white;
    outline: none;
}

.wardrobe-grid-mobile {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.wardrobe-item-mobile {
    background: white;
    border-radius: 10px;
    padding: 12px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.wardrobe-item-mobile:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.wardrobe-item-mobile img {
    width: 100%;
    height: 120px;
    object-fit: contain;
    border-radius: 8px;
    margin-bottom: 8px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
}

.wardrobe-item-mobile .item-name {
    font-weight: 600;
    margin-bottom: 4px;
    color: #242020;
    font-size: 14px;
}

.wardrobe-item-mobile .item-category {
    font-size: 12px;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wardrobe-item-mobile .item-stats {
    margin-top: 6px;
    font-size: 11px;
    color: #6c757d;
}

.item-source-text {
    font-weight: 600;
    text-transform: capitalize;
    color: #4AA953;
}

.item-source {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.source-new {
    background: #dc3545;
    color: white;
}

.source-secondhand {
    background: #28a745;
    color: white;
}

.wardrobe-item-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.wardrobe-item-mobile:hover .wardrobe-item-actions {
    opacity: 1;
}

.item-action-btn {
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    transition: all 0.3s ease;
}

.btn-donate {
    background: #28a745;
    color: white;
}

.btn-donate:hover {
    background: #218838;
}

.reuse-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    margin-top: 4px;
}

.reuse-high {
    color: #28a745;
}

.reuse-medium {
    color: #ffc107;
}

.reuse-low {
    color: #dc3545
}

/* Newly Added Section */
.newly-added-section {
    margin-bottom: 24px;
}

.newly-added-items {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 8px 0;
    margin-bottom: 16px;
}

.newly-added-item {
    position: relative;
    min-width: 80px;
    flex-shrink: 0;
}

.new-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ff4757;
    color: white;
    font-size: 8px;
    font-weight: 600;
    padding: 2px 4px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.empty-newly-added {
    text-align: center;
    color: #6c757d;
    font-size: 14px;
    padding: 16px;
    font-style: italic;
}

/* Reset Section */
.reset-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.reset-btn {
    width: 100%;
    height: 48px;
    background: #dc3545;
    border: none;
    border-radius: 20px;
    color: white;
    font-size: 16px;
    font-weight: 700;
    font-family: "Bricolage Grotesque", sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 10px;
    margin-top: 10px;
}

.reset-btn:hover {
    background: #c82333;
    transform: translateY(-2px);
}

.reset-warning {
    text-align: center;
    color: #dc3545;
    font-size: 12px;
    margin: 0;
    font-weight: 500;
}

/* Bottom Navigation */
.bottom-nav {
    position: absolute;
    bottom: 53px;
    left: 25px;
    right: 25px;
    height: 59px;
    background: #242020;
    border-radius: 50px 50px 50px 50px;
    box-shadow: 0px -4px 4px rgba(0, 0, 0, 0.25);
    z-index: 100;
  }

  .nav-items {
    width: 343px;
    height: 51px;
    margin: 4px auto;
    display: flex;
    justify-content: space-between; 
    align-items: center;
    padding: 0 20px;
  }

  .nav-item {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;       
    align-items: center;
    gap: 5px;
    padding: 10px;
    border-radius: 50px;
    height: 45px;
    transition: all 0.3s ease;
    color: #4AA953;             
  }

  .nav-item.active {
    background: #4AA953;
    width: 140px;
    height: 51px;
    padding: 10px 20px;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #242020;         
  }

  .nav-icon {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    transition: all 0.3s ease;
  }

  .nav-text {
    font-family: "Bricolage Grotesque", sans-serif;
    font-weight: 500;   
    font-size: 15px;  
    text-align: center;

    /* hide/collapse when not active */
    max-width: 0;
    opacity: 0;
    margin-left: 0;
    overflow: hidden;
    transition: max-width 0.25s ease, opacity 0.25s ease, margin-left 0.25s ease;
  }

  .nav-item.active .nav-text {
  
    max-width: 100px;  
    opacity: 1;
    margin-left: 4px;
  }

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 30px;
    max-width: 350px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 20px;
    
}

.donate-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 20px 0;
}

.btn-success {
    background: #28a745;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}

.btn-warning {
    background: #ffc107;
    color: #212529;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}

.btn-danger {
    background: #4AA953;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    font-family: "Bricolage Grotesque", sans-serif;
    transition: all 0.3s ease;
}

.btn-danger:hover {
    background: #3d8a47;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #f8f9fa;;
    color: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-family: "Bricolage Grotesque", sans-serif;
    font-size: 15px;
    font-weight: 400;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    color: #4AA953;
    border: 1px solid #4AA953;
    
}

.donation-impact {
    margin: 20px 0;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.impact-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

/* Messages */
.message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
    font-size: 14px;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Responsive adjustments for larger screens */
@media (min-width: 394px) {
    .mobile-container {
        transform: scale(0.8);
        transform-origin: top center;
        margin: 20px auto;
    }
}

@media (min-width: 500px) {
    .mobile-container {
        transform: scale(0.9);
    }
}

@media (min-width: 600px) {
    .mobile-container {
        transform: scale(1);
    }
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Fix invalid CSS selector */
.days .btn.btn-primary, .days .btn.btn-secondary {
    font-family: "Bricolage Grotesque", sans-serif;
}