/* ==========================================================================
   Learning Diary Plugin Styles
   ========================================================================== */

/* --- General --- */
.ld-form-wrapper,
.ld-entries-wrapper,
.ld-password-form-wrapper,
.ld-access-denied {
    max-width: 720px;
    margin: 0 auto 2rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
}

.ld-form-title,
.ld-entries-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #1a1a2e;
}

/* --- Form Styles --- */
.ld-diary-form {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
}

.ld-field {
    margin-bottom: 1.2rem;
}

.ld-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.3rem;
    color: #333;
    font-size: 0.95rem;
}

.ld-field input[type="text"],
.ld-field input[type="date"],
.ld-field input[type="password"],
.ld-field textarea {
    width: 100%;
    padding: 0.6rem 0.8rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.ld-field input:focus,
.ld-field textarea:focus {
    outline: none;
    border-color: #4a6cf7;
    box-shadow: 0 0 0 3px rgba(74, 108, 247, 0.1);
}

.ld-required {
    color: #e74c3c;
}

.ld-optional {
    color: #999;
    font-weight: 400;
    font-size: 0.85rem;
}

/* --- Confidence Slider --- */
.ld-confidence-slider {
    padding: 0.5rem 0;
}

.ld-confidence-slider input[type="range"] {
    width: 100%;
    -webkit-appearance: none;
    height: 8px;
    background: linear-gradient(to right, #e74c3c, #f39c12, #2ecc71);
    border-radius: 4px;
    outline: none;
}

.ld-confidence-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    background: #fff;
    border: 2px solid #4a6cf7;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.ld-confidence-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #777;
    margin-top: 0.3rem;
}

/* --- Submit Button --- */
.ld-submit-btn {
    background: #4a6cf7;
    color: #fff;
    border: none;
    padding: 0.7rem 1.5rem;
    font-size: 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s, transform 0.1s;
}

.ld-submit-btn:hover {
    background: #3a5ce5;
    transform: translateY(-1px);
}

.ld-submit-btn:active {
    transform: translateY(0);
}

/* --- Messages --- */
.ld-success-message {
    background: #d4edda;
    color: #155724;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 1px solid #c3e6cb;
}

.ld-error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 1px solid #f5c6cb;
}

/* --- Access Denied / Password --- */
.ld-access-denied,
.ld-password-form-wrapper {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    border: 1px solid #e0e0e0;
}

.ld-password-form {
    max-width: 300px;
    margin: 1rem auto 0;
    text-align: left;
}

/* --- Entry Cards --- */
.ld-entries-count {
    color: #777;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.ld-no-entries {
    background: #f8f9fa;
    padding: 2rem;
    text-align: center;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    color: #666;
}

.ld-entry-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 1.2rem 1.5rem;
    margin-bottom: 1rem;
    transition: box-shadow 0.2s;
}

.ld-entry-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.ld-entry-header {
    margin-bottom: 0.8rem;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 0.8rem;
}

.ld-entry-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    align-items: center;
    font-size: 0.85rem;
    color: #777;
    margin-bottom: 0.3rem;
}

.ld-entry-topic {
    margin: 0.3rem 0 0;
    font-size: 1.15rem;
    color: #1a1a2e;
}

.ld-entry-section {
    margin-bottom: 0.7rem;
}

.ld-entry-section strong {
    display: block;
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 0.15rem;
}

.ld-entry-section p {
    margin: 0;
    color: #333;
}

/* --- Confidence Badge --- */
.ld-confidence-badge {
    padding: 0.15rem 0.6rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.ld-confidence-1 { background: #fde8e8; color: #c0392b; }
.ld-confidence-2 { background: #fef3e2; color: #e67e22; }
.ld-confidence-3 { background: #fff8e1; color: #f39c12; }
.ld-confidence-4 { background: #e8f5e9; color: #27ae60; }
.ld-confidence-5 { background: #e3f2fd; color: #2980b9; }

/* --- Pagination --- */
.ld-pagination {
    display: flex;
    gap: 0.3rem;
    justify-content: center;
    margin-top: 1.5rem;
}

.ld-page-link,
.ld-page-current {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.9rem;
    text-decoration: none;
}

.ld-page-link {
    background: #f0f0f0;
    color: #333;
}

.ld-page-link:hover {
    background: #4a6cf7;
    color: #fff;
}

.ld-page-current {
    background: #4a6cf7;
    color: #fff;
    font-weight: 600;
}

/* --- Responsive --- */
@media (max-width: 600px) {
    .ld-diary-form,
    .ld-entry-card {
        padding: 1rem;
    }

    .ld-confidence-labels {
        font-size: 0.65rem;
    }

    .ld-entry-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.3rem;
    }
}
