/**
 * Tea App - Hybrid Layout Design
 * Mobile-first, quick logging with sidebar navigation
 * @version 7.0.0
 */

/* =============================================================================
   THEME COLORS
   ============================================================================= */

.app-tea {
    --tea-primary: #2D5016;
    --tea-secondary: #4A7C59;
    --tea-light: #F0F7F0;
    --tea-bg: linear-gradient(180deg, #F0F7F0 0%, #E8F1E8 100%);
    --tea-star: #F59E0B;
}

/* =============================================================================
   HYBRID LAYOUT OVERRIDES
   ============================================================================= */

/* Apply background to the content area */
.app-tea .hybrid-content {
    background: var(--tea-bg);
}

/* Header styling for tea app */
.app-tea .hybrid-header {
    background-color: rgba(240, 247, 240, 0.95);
    border-bottom-color: #C8DEC8;
}

/* =============================================================================
   MAIN CONTAINER
   ============================================================================= */

.tea-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    padding: 24px 0;
}

/* Tea icon */
.tea-icon {
    font-size: 64px;
    line-height: 1;
    margin-bottom: 8px;
}

/* =============================================================================
   INPUT SECTION
   ============================================================================= */

.input-section {
    width: 100%;
    text-align: center;
}

.input-label {
    display: block;
    font-size: 18px;
    font-weight: 600;
    color: var(--tea-primary);
    margin-bottom: 12px;
}

.tea-input {
    width: 100%;
    padding: 16px 20px;
    font-size: 16px;
    border: 2px solid #C8DEC8;
    border-radius: 12px;
    background: white;
    color: #374151;
    text-align: center;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.tea-input:focus {
    outline: none;
    border-color: var(--tea-primary);
    box-shadow: 0 0 0 3px rgba(45, 80, 22, 0.1);
}

.tea-input::placeholder {
    color: #9CA3AF;
}

.input-hint {
    font-size: 12px;
    color: #9CA3AF;
    margin-top: 8px;
}

/* =============================================================================
   RECENT SECTION
   ============================================================================= */

.recent-section {
    width: 100%;
    text-align: center;
}

.recent-label {
    font-size: 13px;
    color: #5A7968;
    margin-bottom: 10px;
}

.recent-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.recent-chip {
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 500;
    color: var(--tea-primary);
    background: white;
    border: 1px solid #C8DEC8;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.recent-chip:hover {
    background: #F0F7F0;
    border-color: var(--tea-primary);
}

.recent-chip:active {
    transform: scale(0.96);
}

/* =============================================================================
   TYPE SECTION
   ============================================================================= */

.type-section {
    width: 100%;
    text-align: center;
}

.type-label {
    font-size: 13px;
    color: #5A7968;
    margin-bottom: 10px;
}

.type-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.type-chip {
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 500;
    color: #57534E;
    background: white;
    border: 2px solid #C8DEC8;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    display: flex;
    align-items: center;
    gap: 4px;
}

.type-emoji {
    font-size: 14px;
}

.type-chip:hover {
    border-color: var(--tea-secondary);
}

.type-chip.selected {
    background: var(--tea-primary);
    border-color: var(--tea-primary);
    color: white;
}

.type-chip.locked {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

/* =============================================================================
   RATING SECTION
   ============================================================================= */

.rating-section {
    width: 100%;
    text-align: center;
}

.rating-label {
    font-size: 13px;
    color: #5A7968;
    margin-bottom: 10px;
}

.star-rating {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.star {
    width: 48px;
    height: 48px;
    font-size: 28px;
    color: #D4D4D4;
    background: white;
    border: 2px solid #E5E5E5;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.15s ease;
    -webkit-tap-highlight-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}

.star:hover {
    border-color: var(--tea-star);
    color: var(--tea-star);
}

.star.selected {
    color: var(--tea-star);
    border-color: var(--tea-star);
    background: #FFFBEB;
}

/* =============================================================================
   LOG BUTTON
   ============================================================================= */

.log-button {
    width: 100%;
    max-width: 280px;
    padding: 18px 32px;
    font-size: 17px;
    font-weight: 600;
    color: white;
    background: linear-gradient(145deg, #4A7C59, #2D5016);
    border: none;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow:
        0 4px 14px rgba(45, 80, 22, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    -webkit-tap-highlight-color: transparent;
}

.log-button:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow:
        0 6px 20px rgba(45, 80, 22, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.log-button:active:not(:disabled) {
    transform: translateY(0);
}

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

/* =============================================================================
   ACTION BUTTONS
   ============================================================================= */

.action-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.cancel-button {
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 500;
    color: #5A7968;
    background: transparent;
    border: 1px solid #C8DEC8;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cancel-button:hover {
    background: #F0F7F0;
    border-color: var(--tea-primary);
    color: var(--tea-primary);
}

/* =============================================================================
   TODAY'S COUNT
   ============================================================================= */

.today-count {
    font-size: 14px;
    color: #5A7968;
    padding: 10px 20px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* =============================================================================
   TOAST NOTIFICATIONS
   ============================================================================= */

.toast-container {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
}

.toast {
    padding: 12px 24px;
    border-radius: 12px;
    background: white;
    color: #374151;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-success {
    background: #D1FAE5;
    color: #065F46;
}

.toast-error {
    background: #FEE2E2;
    color: #991B1B;
}

/* =============================================================================
   HISTORY SECTION
   ============================================================================= */

.history-section {
    width: 100%;
    margin-top: 8px;
}

.history-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--tea-primary);
    background: white;
    border: 1px solid #C8DEC8;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.history-toggle:hover {
    background: #F0F7F0;
    border-color: var(--tea-primary);
}

.history-toggle[aria-expanded="true"] .history-toggle-icon {
    transform: rotate(180deg);
}

.history-toggle-icon {
    font-size: 10px;
    transition: transform 0.2s ease;
}

.history-list {
    display: none;
    margin-top: 12px;
}

.history-list.expanded {
    display: block;
}

.history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: white;
    border: 1px solid #C8DEC8;
    border-radius: 10px;
    margin-bottom: 8px;
}

.history-item:last-child {
    margin-bottom: 0;
}

.history-item-content {
    flex: 1;
    min-width: 0;
}

.history-item-title {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-item-details {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    font-size: 12px;
    color: #5A7968;
}

.history-item-rating {
    color: var(--tea-star);
}

.history-item-time {
    color: #9CA3AF;
}

.history-item-actions {
    display: flex;
    gap: 4px;
    margin-left: 12px;
}

.history-action-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    background: transparent;
    border: 1px solid #C8DEC8;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.history-action-btn:hover {
    background: #F0F7F0;
    border-color: var(--tea-primary);
}

.history-action-btn--delete:hover {
    background: #FEE2E2;
    border-color: #EF4444;
}

.history-empty {
    text-align: center;
    padding: 20px;
    color: #9CA3AF;
    font-size: 14px;
}

/* =============================================================================
   RESPONSIVE - MOBILE
   ============================================================================= */

@media (max-width: 767px) {
    .tea-container {
        padding: 16px 0;
    }
}

/* Small screens */
@media (max-width: 360px) {
    .tea-icon {
        font-size: 48px;
    }

    .star {
        width: 42px;
        height: 42px;
        font-size: 24px;
    }

    .type-chip {
        padding: 6px 12px;
        font-size: 12px;
    }

    .type-chips {
        gap: 6px;
    }
}
