/**
 * Sermon Notes - Fill-in-the-Blank Styles
 */

/* ==========================================================================
   Notes Toolbar
   ========================================================================== */

.dc-notes-toolbar {
    background: #f8f9fa;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 24px;
}

.dc-notes-toolbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.dc-notes-progress {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dc-notes-progress-text {
    font-size: 14px;
    color: #6b7280;
    white-space: nowrap;
}

.dc-notes-progress-bar {
    width: 120px;
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
}

.dc-notes-progress-fill {
    height: 100%;
    background: #0F1FFF;
    border-radius: 3px;
    transition: width 0.3s ease;
}

.dc-notes-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dc-notes-save-status {
    font-size: 13px;
}

.dc-notes-saving {
    color: #9ca3af;
}

.dc-notes-saved {
    color: #10b981;
}

.dc-notes-error {
    color: #ef4444;
}

.dc-notes-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: #0F1FFF;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
}

.dc-notes-btn:hover {
    background: #0915cc;
}

.dc-notes-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.dc-notes-btn svg {
    flex-shrink: 0;
}

.dc-notes-spinner {
    animation: dc-spin 1s linear infinite;
}

@keyframes dc-spin {
    to { transform: rotate(360deg); }
}

.dc-notes-login-prompt {
    font-size: 13px;
    color: #6b7280;
}

.dc-notes-login-prompt a {
    color: #0F1FFF;
    text-decoration: underline;
}

/* ==========================================================================
   Blank Input Wrappers
   ========================================================================== */

.dc-blank-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    position: relative;
}

.dc-blank-input {
    display: inline-block;
    min-width: 100px;
    max-width: 250px;
    width: auto;
    padding: 4px 8px;
    border: none;
    border-bottom: 2px dashed #d1d5db;
    background: transparent;
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.dc-blank-input:focus {
    outline: none;
    border-bottom-style: solid;
    border-bottom-color: #0F1FFF;
    background: rgba(15, 31, 255, 0.05);
}

.dc-blank-input::placeholder {
    color: #9ca3af;
    font-style: italic;
}

/* Filled state */
.dc-blank-wrapper.dc-blank-filled .dc-blank-input {
    border-bottom-style: solid;
    border-bottom-color: #6b7280;
}

/* Correct answer state */
.dc-blank-wrapper.dc-blank-correct .dc-blank-input {
    border-bottom-style: solid;
    border-bottom-color: #10b981;
    color: #059669;
}

.dc-blank-wrapper.dc-blank-correct::after {
    content: '✓';
    color: #10b981;
    font-size: 14px;
    margin-left: 4px;
}

/* Answer reveal */
.dc-blank-reveal {
    display: none;
    font-size: 12px;
    color: #9ca3af;
    margin-left: 4px;
}

.dc-blank-wrapper.dc-blank-correct .dc-blank-reveal {
    display: inline;
    color: #10b981;
}

/* Focused state */
.dc-blank-wrapper.dc-blank-focused {
    z-index: 1;
}

/* ==========================================================================
   Notification Toast
   ========================================================================== */

.dc-notes-notification {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.dc-notes-notification-visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.dc-notes-notification-success {
    background: #10b981;
    color: #fff;
}

.dc-notes-notification-error {
    background: #ef4444;
    color: #fff;
}

.dc-notes-notification-info {
    background: #3b82f6;
    color: #fff;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 640px) {
    .dc-notes-toolbar-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .dc-notes-progress-bar {
        width: 100px;
    }

    .dc-blank-input {
        min-width: 80px;
        max-width: 180px;
    }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    .dc-notes-toolbar {
        display: none;
    }

    .dc-blank-input {
        border: none;
        border-bottom: 1px solid #000;
        background: transparent;
    }

    .dc-blank-wrapper.dc-blank-correct::after {
        content: none;
    }
}
