/* Tea Finder Widget Styles */
.tea-finder-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid #e1e5e9;
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Dark Mode Styles */
html[data-theme="dark"] .tea-finder-container {
    background: #1f2937;
    border: 1px solid #374151;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.tea-finder-header {
    text-align: center;
    margin-bottom: 30px;
}

.tea-finder-header h2 {
    color: #2d5016;
    margin: 0 0 10px 0;
    font-size: 2rem;
    font-weight: 600;
    transition: color 0.3s ease;
}

.tea-finder-header p {
    color: #6b7280;
    margin: 0;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

/* Dark Mode Header */
html[data-theme="dark"] .tea-finder-header h2 {
    color: #4ade80;
}

html[data-theme="dark"] .tea-finder-header p {
    color: #9ca3af;
}

/* Goal Selection */
.goal-selection {
    margin-bottom: 40px;
}

.goal-selection h3 {
    text-align: center;
    color: #374151;
    margin: 0 0 25px 0;
    font-size: 1.3rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

/* Dark Mode Goal Selection */
html[data-theme="dark"] .goal-selection h3 {
    color: #e5e7eb;
}

.goal-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    max-width: 800px;
    margin: 0 auto;
}

.goal-btn {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-height: 120px;
}

.goal-btn:hover {
    border-color: #7dd3fc;
    box-shadow: 0 4px 15px rgba(125, 211, 252, 0.3);
    transform: translateY(-2px);
}

.goal-btn.active {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-color: #3b82f6;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

/* Dark Mode Goal Buttons */
html[data-theme="dark"] .goal-btn {
    background: linear-gradient(135deg, #374151 0%, #4b5563 100%);
    border: 2px solid #4b5563;
}

html[data-theme="dark"] .goal-btn:hover {
    border-color: #06b6d4;
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.3);
}

html[data-theme="dark"] .goal-btn.active {
    background: linear-gradient(135deg, #1e3a8a 0%, #3730a3 100%);
    border-color: #3b82f6;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.goal-icon {
    font-size: 2rem;
    display: block;
}

.goal-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
    display: block;
    transition: color 0.3s ease;
}

.goal-desc {
    font-size: 0.9rem;
    color: #6b7280;
    display: block;
    transition: color 0.3s ease;
}

/* Dark Mode Goal Button Text */
html[data-theme="dark"] .goal-text {
    color: #f9fafb;
}

html[data-theme="dark"] .goal-desc {
    color: #d1d5db;
}

/* Tea Information Section */
.tea-info-section {
    margin: 40px 0;
    padding: 30px 0;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
    transition: border-color 0.3s ease;
}

html[data-theme="dark"] .tea-info-section {
    border-top: 1px solid #4b5563;
    border-bottom: 1px solid #4b5563;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.info-card {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.info-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: #10b981;
}

html[data-theme="dark"] .info-card {
    background: linear-gradient(135deg, #374151 0%, #4b5563 100%);
    border: 1px solid #4b5563;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

html[data-theme="dark"] .info-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border-color: #10b981;
}

.info-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    display: block;
}

.info-card h4 {
    color: #1f2937;
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0 0 12px 0;
    transition: color 0.3s ease;
}

.info-card p {
    color: #6b7280;
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
    transition: color 0.3s ease;
}

html[data-theme="dark"] .info-card h4 {
    color: #f9fafb;
}

html[data-theme="dark"] .info-card p {
    color: #d1d5db;
}

.tea-benefits-overview {
    margin-bottom: 35px;
}

.tea-benefits-overview h3 {
    text-align: center;
    color: #1f2937;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 25px 0;
    transition: color 0.3s ease;
}

html[data-theme="dark"] .tea-benefits-overview h3 {
    color: #f9fafb;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.benefit-item {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.benefit-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.15);
    border-color: #10b981;
}

html[data-theme="dark"] .benefit-item {
    background: #374151;
    border: 1px solid #4b5563;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

html[data-theme="dark"] .benefit-item:hover {
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.25);
    border-color: #10b981;
}

.benefit-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 12px;
}

.benefit-item strong {
    color: #1f2937;
    font-size: 1.1rem;
    font-weight: 600;
    display: block;
    margin-bottom: 8px;
    transition: color 0.3s ease;
}

.benefit-item p {
    color: #6b7280;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
    transition: color 0.3s ease;
}

html[data-theme="dark"] .benefit-item strong {
    color: #f9fafb;
}

html[data-theme="dark"] .benefit-item p {
    color: #d1d5db;
}

.tea-ritual-section {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border: 1px solid #a7f3d0;
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.1);
    transition: all 0.3s ease;
}

html[data-theme="dark"] .tea-ritual-section {
    background: linear-gradient(135deg, #064e3b 0%, #065f46 100%);
    border: 1px solid #047857;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.tea-ritual-section h3 {
    color: #047857;
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0 0 16px 0;
    transition: color 0.3s ease;
}

.ritual-description {
    color: #065f46;
    font-size: 1.05rem;
    line-height: 1.7;
    margin: 0;
    max-width: 800px;
    margin: 0 auto;
    transition: color 0.3s ease;
}

html[data-theme="dark"] .tea-ritual-section h3 {
    color: #6ee7b7;
}

html[data-theme="dark"] .ritual-description {
    color: #a7f3d0;
}

/* Results Section */
.results-section {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.results-header {
    text-align: center;
    margin-bottom: 25px;
}

.results-header h3 {
    color: #2d5016;
    margin: 0 0 8px 0;
    font-size: 1.5rem;
    font-weight: 600;
    transition: color 0.3s ease;
}

.results-header p {
    color: #6b7280;
    margin: 0;
    font-size: 1rem;
    transition: color 0.3s ease;
}

/* Dark Mode Results Header */
html[data-theme="dark"] .results-header h3 {
    color: #4ade80;
}

html[data-theme="dark"] .results-header p {
    color: #9ca3af;
}

/* Tea Cards */
.tea-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.tea-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.tea-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #10b981, #34d399);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tea-card:hover {
    border-color: #10b981;
    box-shadow: 0 12px 32px rgba(16, 185, 129, 0.15);
    transform: translateY(-4px);
}

.tea-card:hover::before {
    opacity: 1;
}

/* Dark Mode Tea Cards */
html[data-theme="dark"] .tea-card {
    background: #374151;
    border: 1px solid #4b5563;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

html[data-theme="dark"] .tea-card:hover {
    border-color: #10b981;
    box-shadow: 0 12px 32px rgba(16, 185, 129, 0.25);
}

.tea-header {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.tea-title-row {
    display: flex;
    align-items: center;
}

.tea-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
    line-height: 1.3;
    transition: color 0.3s ease;
}

/* Dark Mode Tea Name */
html[data-theme="dark"] .tea-name {
    color: #f9fafb;
}

.tea-meta-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.tea-type {
    font-size: 0.8rem;
    color: #6b7280;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 6px 12px;
    border-radius: 20px;
    white-space: nowrap;
    font-weight: 500;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

/* Dark Mode Tea Type */
html[data-theme="dark"] .tea-type {
    color: #d1d5db;
    background: #4b5563;
    border: 1px solid #6b7280;
}

.caffeine-badge {
    background: #fef3c7;
    color: #92400e;
    padding: 6px 10px;
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid #f3f4f6;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.caffeine-badge.no-caffeine {
    background: #dbeafe;
    color: #1e40af;
}

.caffeine-badge.low-caffeine {
    background: #fef3c7;
    color: #92400e;
}

.caffeine-badge.medium-caffeine {
    background: #fed7aa;
    color: #9a3412;
}

.caffeine-badge.high-caffeine {
    background: #fecaca;
    color: #991b1b;
}

.botanical-name {
    font-style: italic;
    color: #9ca3af;
    font-size: 0.85rem;
    margin-bottom: 16px;
    padding-left: 2px;
    transition: color 0.3s ease;
}

/* Dark Mode Botanical Name */
html[data-theme="dark"] .botanical-name {
    color: #6b7280;
}

.benefits {
    margin-bottom: 16px;
}

.benefits-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    transition: color 0.3s ease;
}

/* Dark Mode Benefits Title */
html[data-theme="dark"] .benefits-title {
    color: #e5e7eb;
}

.benefit-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.benefit-tag {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    color: #047857;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid #a7f3d0;
    transition: all 0.2s ease;
}

.benefit-tag:hover {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    transform: translateY(-1px);
}

.flavor-notes {
    color: #6b7280;
    font-size: 0.95rem;
    margin-bottom: 16px;
    line-height: 1.5;
    background: #f8fafc;
    padding: 12px;
    border-radius: 8px;
    border-left: 3px solid #10b981;
    transition: all 0.3s ease;
}

/* Dark Mode Flavor Notes */
html[data-theme="dark"] .flavor-notes {
    color: #d1d5db;
    background: #4b5563;
    border-left: 3px solid #10b981;
}

.brewing-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    font-size: 0.85rem;
    color: #6b7280;
    margin-top: 16px;
    padding: 16px;
    background: #f9fafb;
    border-radius: 12px;
    border: 1px solid #f3f4f6;
    transition: all 0.3s ease;
}

/* Dark Mode Brewing Info */
html[data-theme="dark"] .brewing-info {
    color: #d1d5db;
    background: #4b5563;
    border: 1px solid #6b7280;
}

.brewing-detail {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-align: center;
}

.brewing-detail strong {
    color: #374151;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
}

/* Dark Mode Brewing Detail Strong */
html[data-theme="dark"] .brewing-detail strong {
    color: #f3f4f6;
}

.learn-more {
    text-align: center;
    margin-top: 20px;
}

.learn-more-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    padding: 12px 24px;
    border-radius: 25px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.learn-more-btn:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.learn-more-btn:hover {
    color: #047857;
}

/* Modal Styles */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    background-color: #ffffff;
    margin: 5% auto;
    padding: 0;
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transition: background-color 0.3s ease;
}

/* Dark Mode Modal */
html[data-theme="dark"] .modal {
    background-color: rgba(0, 0, 0, 0.7);
}

html[data-theme="dark"] .modal-content {
    background-color: #1f2937;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.close-modal {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #6b7280;
    cursor: pointer;
    z-index: 1001;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-modal:hover {
    background-color: #f3f4f6;
    color: #374151;
}

/* Dark Mode Close Modal */
html[data-theme="dark"] .close-modal {
    color: #9ca3af;
}

html[data-theme="dark"] .close-modal:hover {
    background-color: #4b5563;
    color: #f3f4f6;
}

#modal-body {
    padding: 30px;
}

.modal-tea-header {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f3f4f6;
}

.modal-tea-name {
    font-size: 2rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 8px 0;
    transition: color 0.3s ease;
}

.modal-botanical {
    font-style: italic;
    color: #6b7280;
    font-size: 1.1rem;
    margin-bottom: 15px;
    transition: color 0.3s ease;
}

/* Dark Mode Modal Text */
html[data-theme="dark"] .modal-tea-name {
    color: #f9fafb;
}

html[data-theme="dark"] .modal-botanical {
    color: #9ca3af;
}

.modal-section {
    margin-bottom: 25px;
}

.modal-section h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s ease;
}

/* Dark Mode Modal Section Headers */
html[data-theme="dark"] .modal-section h4 {
    color: #f9fafb;
}

.brewing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.brewing-item {
    background: #f8fafc;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    transition: all 0.3s ease;
}

.brewing-item strong {
    display: block;
    color: #374151;
    font-size: 0.9rem;
    margin-bottom: 4px;
    transition: color 0.3s ease;
}

.brewing-item span {
    color: #6b7280;
    font-size: 1rem;
    transition: color 0.3s ease;
}

/* Dark Mode Brewing Items */
html[data-theme="dark"] .brewing-item {
    background: #4b5563;
}

html[data-theme="dark"] .brewing-item strong {
    color: #f3f4f6;
}

html[data-theme="dark"] .brewing-item span {
    color: #d1d5db;
}

.contraindications {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
    transition: all 0.3s ease;
}

.contraindications span {
    color: #dc2626;
    font-weight: 600;
    font-size: 1rem;
    display: block;
    margin-bottom: 8px;
    transition: color 0.3s ease;
}

.contraindications p {
    color: #991b1b;
    margin: 0;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

/* Dark Mode Contraindications */
html[data-theme="dark"] .contraindications {
    background: #7f1d1d;
    border: 1px solid #991b1b;
}

html[data-theme="dark"] .contraindications span {
    color: #fca5a5;
}

html[data-theme="dark"] .contraindications p {
    color: #fecaca;
}

.evidence-note {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
    transition: all 0.3s ease;
}

.evidence-note span {
    color: #0369a1;
    font-weight: 600;
    font-size: 1rem;
    display: block;
    margin-bottom: 8px;
    transition: color 0.3s ease;
}

.evidence-note p {
    color: #0c4a6e;
    margin: 0;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

/* Dark Mode Evidence Note */
html[data-theme="dark"] .evidence-note {
    background: #1e3a8a;
    border: 1px solid #3730a3;
}

html[data-theme="dark"] .evidence-note span {
    color: #93c5fd;
}

html[data-theme="dark"] .evidence-note p {
    color: #bfdbfe;
}

/* Responsive Design */
@media (max-width: 768px) {
    .tea-finder-container {
        margin: 10px;
        padding: 15px;
    }

    .goal-buttons {
        grid-template-columns: 1fr;
    }

    .tea-cards-container {
        grid-template-columns: 1fr;
    }

    .modal-content {
        width: 95%;
        margin: 10px auto;
        max-height: 90vh;
    }

    #modal-body {
        padding: 20px;
    }

    .brewing-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .tea-finder-header h2 {
        font-size: 1.5rem;
    }

    .brewing-grid {
        grid-template-columns: 1fr;
    }

    .goal-btn {
        padding: 15px;
        min-height: 100px;
    }

    .goal-icon {
        font-size: 1.5rem;
    }

    .info-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-bottom: 30px;
    }

    .benefits-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .tea-ritual-section {
        padding: 20px;
    }

    .info-card {
        padding: 20px;
    }

    .benefit-item {
        padding: 16px;
    }
}
