/* ===== CSS VARIABLES ===== */
.daily-verse-generator-plugin {
    --background: #fffbf0;
    --foreground: #333333;
    --border: #f0e6cc;
    --card: #fff8e1;
    --card-foreground: #333333;
    --card-border: #f5e8c1;
    --primary: #ffc107;
    --primary-foreground: #333333;
    --secondary: #ffeaa7;
    --secondary-foreground: #333333;
    --accent: #ffd54f;
    --accent-foreground: #333333;
    --muted: #f9f3e9;
    --muted-foreground: #666666;
    --destructive: #dc3545;
    --destructive-foreground: #ffffff;
    --input: #f5e8c1;
    --ring: #ffc107;
    --info: #17a2b8;
    --info-foreground: #ffffff;

    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-serif: 'Playfair Display', Georgia, serif;
    --font-body: 'Source Serif 4', Georgia, serif;
    --radius: 8px;
}

.daily-verse-generator-plugin * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Dashicons Styling */
.dashicons {
    display: inline-block;
    line-height: 1;
    font-size: 20px;
    width: 20px;
    height: 20px;
    text-align: center;
    vertical-align: middle;
    margin-right: 8px;
}

.btn .dashicons {
    margin-right: 6px;
    font-size: 18px;
}

.btn-small .dashicons {
    font-size: 16px;
    margin-right: 4px;
}

/* Toast notifications with dashicons */
.toast .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
    margin-right: 8px;
}

/* Favorite button styling */
.btn-favorite {
    color: #dc3545;
}

.btn-favorite.active {
    color: #dc3545;
    background-color: rgba(220, 53, 69, 0.1);
}

/* ===== VERSE BOX ===== */
.dvg-verse-box-section {
    padding: 2rem 1rem;
    text-align: center;
    background-color: var(--background);
}

.daily-verse-header {
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--foreground);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: var(--font-serif);
    line-height: 1.2;
}

.daily-verse-count {
    font-size: 1rem;
    color: var(--muted-foreground);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.verse-container {
    background-color: var(--card);
    border-radius: var(--radius);
    padding: clamp(1rem, 4vw, 2rem);
    margin: 0 auto 2rem;
    max-width: 800px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    text-align: center;
    border: 1px solid var(--card-border);
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.verse-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.verse-text {
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    font-style: italic;
    margin-bottom: 1.5rem;
    line-height: 1.7;
    color: var(--card-foreground);
    font-family: var(--font-body);
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.verse-reference {
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    color: var(--muted-foreground);
    font-weight: 600;
    margin-bottom: 1.5rem;
    font-family: var(--font-sans);
}

.verse-actions {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.btn {
    padding: 0.75rem 1.25rem;
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: var(--font-sans);
    position: relative;
    text-decoration: none;
    font-size: 0.9rem;
    line-height: 1;
    min-height: 44px;
    touch-action: manipulation;
    border: 1px solid transparent;
}

.btn:focus-visible {
    outline: 2px solid var(--ring);
    outline-offset: 2px;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--primary-foreground);
    border-color: #e0a800;
}

.btn-primary:hover:not(:disabled) {
    background-color: #e0a800;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.btn-secondary {
    background-color: var(--secondary);
    color: var(--primary-foreground);
    border-color: #f0c929;
}

.btn-secondary:hover:not(:disabled) {
    background-color: #f0c929;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.btn-share {
    background-color: var(--accent);
    color: var(--primary-foreground);
    border-color: #ffc107;
}

.btn-share:hover:not(:disabled) {
    background-color: #ffb300;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.btn-copied {
    background-color: #28a745 !important;
    color: white !important;
    border-color: #1e7e34 !important;
}

/* Verse loading animation */
.verse-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--muted);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: dvg-spin 1s ease-in-out infinite;
    margin-right: 10px;
    flex-shrink: 0;
}

@keyframes dvg-spin {
    to { transform: rotate(360deg); }
}

/* ===== ENHANCED FEATURES SECTION ===== */
.dvg-enhanced-features-section {
    padding: 2rem 1rem;
    background-color: var(--background);
}

.section-title {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--foreground);
    font-family: var(--font-serif);
    font-size: clamp(1.25rem, 3vw, 1.5rem);
    line-height: 1.3;
}

.feature-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 0.5rem;
}

.feature-tab {
    padding: 0.75rem 1.25rem;
    cursor: pointer;
    font-weight: 600;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
    text-align: center;
    min-width: 100px;
    background: none;
    border: none;
    font-family: var(--font-sans);
    color: var(--foreground);
    position: relative;
    touch-action: manipulation;
}

.feature-tab:focus-visible {
    outline: 2px solid var(--ring);
    outline-offset: 2px;
}

.feature-tab.active {
    border-bottom: 3px solid var(--primary);
    color: var(--primary);
}

.feature-content {
    display: none;
    max-width: 800px;
    margin: 0 auto;
    animation: fadeIn 0.3s ease;
}

.feature-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.history-list, .favorites-list {
    list-style: none;
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    scrollbar-width: thin;
    scrollbar-color: var(--primary) var(--muted);
}

.history-list::-webkit-scrollbar,
.favorites-list::-webkit-scrollbar {
    width: 8px;
}

.history-list::-webkit-scrollbar-track,
.favorites-list::-webkit-scrollbar-track {
    background: var(--muted);
    border-radius: var(--radius);
}

.history-list::-webkit-scrollbar-thumb,
.favorites-list::-webkit-scrollbar-thumb {
    background-color: var(--primary);
    border-radius: var(--radius);
}

.history-item, .favorite-item {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    transition: background-color 0.3s;
    gap: 1rem;
}

.history-item:hover, .favorite-item:hover {
    background-color: var(--muted);
}

.history-item:last-child, .favorite-item:last-child {
    border-bottom: none;
}

.verse-preview {
    flex: 1;
    min-width: 0;
}

.verse-preview-text {
    font-style: italic;
    margin-bottom: 0.5rem;
    line-height: 1.5;
    color: var(--foreground);
    word-wrap: break-word;
}

.verse-preview-reference {
    font-size: 0.9rem;
    color: var(--muted-foreground);
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.empty-state {
    text-align: center;
    padding: 2rem;
    color: var(--muted-foreground);
    background: var(--muted);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.empty-state p {
    margin: 0;
    line-height: 1.5;
}

.search-container {
    margin-bottom: 2rem;
    display: flex;
    gap: 0.75rem;
}

.search-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--input);
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: 1rem;
    background-color: var(--background);
    color: var(--foreground);
    transition: border-color 0.3s, box-shadow 0.3s;
    min-height: 44px;
}

.search-input:focus-visible {
    outline: 2px solid var(--ring);
    outline-offset: 2px;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.25);
}

.search-btn {
    background-color: var(--primary);
    color: var(--primary-foreground);
    border: none;
    padding: 0 1.5rem;
    border-radius: var(--radius);
    cursor: pointer;
    font-family: var(--font-sans);
    font-weight: 600;
    white-space: nowrap;
    transition: background-color 0.3s;
    min-height: 44px;
    touch-action: manipulation;
}

.search-btn:focus-visible {
    outline: 2px solid var(--ring);
    outline-offset: 2px;
}

.search-btn:hover {
    background-color: #e0a800;
}

.search-results {
    margin-top: 1rem;
}

.search-results-list {
    list-style: none;
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.search-result-item {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-preview {
    flex: 1;
    min-width: 0;
}

.search-result-text {
    font-style: italic;
    margin-bottom: 0.5rem;
    line-height: 1.5;
    color: var(--foreground);
    word-wrap: break-word;
}

.search-result-reference {
    font-size: 0.9rem;
    color: var(--muted-foreground);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.search-result-topics {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-top: 0.5rem;
}

.topic-tag {
    background: var(--secondary);
    color: var(--secondary-foreground);
    padding: 0.125rem 0.5rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 500;
}

/* ===== TOPICS SECTION ===== */
.dvg-topics-section {
    padding: 2rem 1rem;
    background-color: var(--background);
}

.topics-container {
    background-color: var(--card);
    border-radius: var(--radius);
    padding: clamp(1rem, 3vw, 2rem);
    margin: 0 auto;
    max-width: 800px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border: 1px solid var(--card-border);
}

.topics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.75rem;
}

.topic-item {
    background-color: var(--secondary);
    border-radius: var(--radius);
    padding: 0.75rem 0.5rem;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
    color: var(--foreground);
    font-family: var(--font-body);
    font-size: 0.9rem;
    border: none;
    touch-action: manipulation;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.topic-item:focus-visible {
    outline: 2px solid var(--ring);
    outline-offset: 2px;
}

.topic-item:hover {
    background-color: #f0c929;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.topic-item.active-topic {
    background-color: var(--primary);
    color: var(--primary-foreground);
    font-weight: 600;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* ===== TOAST NOTIFICATION ===== */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--primary);
    color: var(--primary-foreground);
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 10000;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    max-width: min(350px, calc(100vw - 40px));
    pointer-events: none;
    opacity: 0;
}

.toast.error {
    background: var(--destructive);
    color: var(--destructive-foreground);
}

.toast.info {
    background: var(--info);
    color: var(--info-foreground);
}

.toast.show {
    transform: translateX(0);
    pointer-events: auto;
    opacity: 1;
}

/* Action buttons small */
.action-buttons-small {
    display: flex;
    gap: 0.5rem;
}

.btn-small {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    min-height: 36px;
}

.btn-small:focus-visible {
    outline: 2px solid var(--ring);
    outline-offset: 2px;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .dvg-verse-box-section {
        padding: 1.5rem 1rem;
    }
    
    .verse-container {
        padding: 1.5rem 1rem;
        margin-bottom: 1.5rem;
    }
    
    .verse-text {
        min-height: 60px;
        font-size: 1.1rem;
    }
    
    .verse-actions {
        gap: 0.5rem;
    }
    
    .btn {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
        flex: 1;
        min-width: 140px;
    }
    
    .toast {
        bottom: 10px;
        right: 10px;
        left: 10px;
        transform: translateY(100px);
        max-width: none;
        margin: 0 10px;
    }
    
    .toast.show {
        transform: translateY(0);
    }
    
    .feature-tabs {
        flex-direction: column;
        gap: 0;
    }
    
    .feature-tab {
        text-align: left;
        border-bottom: 1px solid var(--border);
        border-left: 3px solid transparent;
        padding: 1rem;
    }
    
    .feature-tab.active {
        border-bottom: 1px solid var(--border);
        border-left: 3px solid var(--primary);
        border-bottom-color: var(--border);
    }
    
    .history-item, .favorite-item, .search-result-item {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .verse-preview {
        padding-right: 0;
        width: 100%;
    }
    
    .action-buttons-small {
        width: 100%;
        justify-content: flex-end;
    }
    
    .search-container {
        flex-direction: column;
    }
    
    .search-input, .search-btn {
        width: 100%;
    }
    
    .topics-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 0.5rem;
    }
    
    .topic-item {
        padding: 0.5rem 0.4rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .daily-verse-header {
        font-size: 1.4rem;
    }
    
    .verse-container {
        padding: 1.2rem 0.75rem;
    }
    
    .verse-text {
        font-size: 1rem;
    }
    
    .verse-reference {
        font-size: 0.95rem;
    }
    
    .section-title {
        font-size: 1.2rem;
    }
    
    .btn {
        min-width: 120px;
        font-size: 0.8rem;
        padding: 0.6rem 0.75rem;
    }
    
    .topics-grid {
        grid-template-columns: repeat(auto-fill, minmax(85px, 1fr));
        gap: 0.4rem;
    }
    
    .topic-item {
        padding: 0.4rem 0.3rem;
        font-size: 0.8rem;
        min-height: 40px;
    }
    
    .verse-actions {
        gap: 0.4rem;
    }
}