/**
 * Pause and Reflect Styles
 * OS 31/Oct/2025
 * 
 * Elegant monochromatic design for the reflection system
 */

/* ================================
   BASE STRUCTURE
   ================================ */

.wtd-pause-reflect-section {
    margin-top: 60px;
    padding: 0;
    background: transparent;
    position: relative;
}

.wtd-pause-reflect-section .container {
    min-width: 1000px;
    max-width: 1600px;
}

.wtd-reflections-wrapper {
    background: #fff;
    border: none;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: none;
}

/* ================================
   SECTION HEADER
   ================================ */

.wtd-reflections-header {
    padding: 50px 50px 40px;
    border-bottom: none;
    text-align: center;
    background: transparent;
}

.wtd-section-title-wrapper {
    cursor: pointer;
    user-select: none;
    transition: opacity 0.2s ease;
}

.wtd-section-title-wrapper:hover {
    opacity: 0.7;
}

.wtd-reflections-title {
    font-family: 'Manrope', sans-serif;
    font-size: 28px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 10px 0;
    letter-spacing: -0.02em;
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.wtd-reflection-count {
    font-size: 20px;
    color: #6b6b6b;
    font-weight: 400;
}

.wtd-section-chevron {
    font-size: 20px;
    color: #6b6b6b;
    display: inline-block;
    font-style: normal;
}

/* No rotation needed - we change the HTML entity instead */

.wtd-reflections-subtitle {
    font-family: 'Manrope', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #6b6b6b;
    margin: 0 auto 25px;
    font-weight: 400;
    max-width: 600px;
}

/* Sort Toggle - iOS Style */
.wtd-sort-toggle-wrapper {
    text-align: right;
    padding: 0 50px 20px;
}

.wtd-sort-toggle {
    display: inline-block;
    cursor: pointer;
}

.wtd-toggle-track {
    position: relative;
    width: 70px;
    height: 32px;
    background: #f0ece8;
    border: 1px solid #e5ddd5;
    border-radius: 16px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px;
}

.wtd-sort-toggle:hover .wtd-toggle-track {
    background: #e5ddd5;
}

.wtd-toggle-knob {
    position: absolute;
    left: 3px;
    top: 3px;
    width: 26px;
    height: 26px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.wtd-sort-toggle[data-order="asc"] .wtd-toggle-knob {
    left: 41px;
}

.wtd-clock-icon {
    width: 14px;
    height: 14px;
    color: #6b6b6b;
}

.wtd-sort-arrow {
    font-size: 16px;
    line-height: 1;
    font-weight: 600;
    color: #6b6b6b;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.wtd-arrow-left {
    opacity: 0;
}

.wtd-arrow-right {
    opacity: 1;
}

.wtd-sort-toggle[data-order="asc"] .wtd-arrow-left {
    opacity: 1;
}

.wtd-sort-toggle[data-order="asc"] .wtd-arrow-right {
    opacity: 0;
}

/* ================================
   REFLECTION FORM
   ================================ */

.wtd-reflection-form-wrapper {
    padding: 40px 50px 50px;
    border-bottom: none;
    background: transparent;
}

.wtd-reflection-form {
    position: relative;
}

.wtd-form-header {
    margin-bottom: 15px;
}

.wtd-form-meta {
    display: block;
}

.wtd-user-name,
.wtd-reflection-author-name {
    font-family: 'Manrope', sans-serif;
    font-size: 17px;
    font-weight: 700;
    color: #1a1a1a;
    display: inline-block;
    margin-right: 10px;
    letter-spacing: -0.02em;
}

.wtd-admin-badge {
    font-family: 'Manrope', sans-serif;
    font-size: 11px;
    font-weight: 600;
    color: #6b6b6b;
    background: #f0ece8;
    padding: 3px 10px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    display: inline-block;
    margin-left: 8px;
    vertical-align: middle;
}

/* ================================
   TEXTAREA & WORD COUNTER
   ================================ */

.wtd-reflection-textarea {
    width: 100%;
    min-height: 120px;
    padding: 20px;
    border: 1px solid #f0ece8;
    border-radius: 12px;
    font-family: 'Manrope', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #1a1a1a;
    resize: vertical;
    transition: all 0.3s ease;
    background: #fafaf8;
}

.wtd-reflection-textarea:focus {
    outline: none;
    border-color: #e5ddd5;
    background: #fff;
}

.wtd-reflection-textarea::placeholder {
    color: #a8a8a8;
    font-size: 15px;
    line-height: 1.5;
}

.wtd-form-footer {
    margin-top: 12px;
    text-align: right;
}

.wtd-word-counter {
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
    color: #6b6b6b;
}

.wtd-word-count {
    font-weight: 600;
    color: #1a1a1a;
}

.wtd-word-counter.wtd-over-limit .wtd-word-count {
    color: #d32f2f;
}

/* ================================
   FORM ACTIONS
   ================================ */

.wtd-form-actions {
    margin-top: 20px;
    display: flex;
    gap: 15px;
    align-items: center;
}

.wtd-submit-btn,
.wtd-cancel-btn {
    font-family: 'Manrope', sans-serif;
    font-size: 15px;
    font-weight: 600;
    padding: 12px 30px;
    border-radius: 25px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.wtd-submit-btn {
    background: #1a1a1a;
    color: #fff;
}

.wtd-submit-btn:hover:not(:disabled) {
    background: #000;
    transform: translateY(-1px);
}

.wtd-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.wtd-cancel-btn {
    background: #f0ece8;
    color: #6b6b6b;
}

.wtd-cancel-btn:hover {
    background: #e5ddd5;
    color: #1a1a1a;
}

/* ================================
   REPLY CONTEXT
   ================================ */

.wtd-reply-context {
    background: #f0ece8;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.wtd-reply-label {
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
    color: #6b6b6b;
}

.wtd-reply-author {
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
}

.wtd-clear-reply {
    margin-left: auto;
    background: none;
    border: none;
    font-size: 20px;
    color: #a8a8a8;
    cursor: pointer;
    padding: 0 5px;
}

.wtd-clear-reply:hover {
    color: #6b6b6b;
}

/* ================================
   LOGIN PROMPT
   ================================ */

.wtd-login-prompt {
    padding: 40px 50px 60px;
    text-align: center;
    border-bottom: none;
    background: transparent;
}

.wtd-login-prompt p {
    font-family: 'Manrope', sans-serif;
    font-size: 16px;
    color: #6b6b6b;
    margin: 0;
}

.wtd-login-prompt a {
    color: #1a1a1a;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid #d4d4d4;
}

.wtd-login-prompt a:hover {
    border-color: #1a1a1a;
}

/* ================================
   REFLECTIONS LIST
   ================================ */

.wtd-reflections-list {
    padding: 40px 50px 20px;
    min-height: 200px;
    background: transparent;
}

.wtd-no-reflections {
    text-align: center;
    font-family: 'Manrope', sans-serif;
    font-size: 16px;
    color: #a8a8a8;
    padding: 60px 20px;
    margin: 0;
}

/* ================================
   INDIVIDUAL REFLECTION
   ================================ */

.wtd-reflection-item {
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: none;
}

.wtd-reflection-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
}

.wtd-reflection-header {
    margin-bottom: 20px;
}

.wtd-reflection-author {
    display: block;
}

.wtd-reflection-meta {
    display: block;
}

.wtd-reflection-author-name {
    text-decoration: none;
    color: #1a1a1a;
    transition: color 0.2s ease;
}

.wtd-reflection-author-name:hover {
    color: #6b6b6b;
}

.wtd-reflection-time {
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
    color: #a8a8a8;
    font-weight: 500;
}

.wtd-reflection-edit-info {
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
    color: #6b6b6b;
    margin-left: 8px;
}

.wtd-edit-reflection-btn {
    background: none;
    border: none;
    color: #1a1a1a;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
}

.wtd-edit-reflection-btn:hover {
    color: #6b6b6b;
}

/* ================================
   REFLECTION CONTENT
   ================================ */

.wtd-reflection-content {
    padding-left: 0;
}

.wtd-reflection-text {
    font-family: 'Manrope', sans-serif;
    font-size: 18px;
    line-height: 1.75;
    color: #1a1a1a;
    margin-bottom: 15px;
    font-weight: 400;
    letter-spacing: -0.01em;
}

.wtd-reflection-word-count {
    font-family: 'Manrope', sans-serif;
    font-size: 12px;
    color: #a8a8a8;
    display: inline-block;
    font-weight: 500;
}

/* ================================
   ADMIN REFLECTIONS
   ================================ */

.wtd-reflection-item.wtd-admin-reflection:not(.wtd-reflection-reply) {
    background: #fafaf8;
    padding: 30px;
    border-radius: 12px;
    margin-left: 0;
    margin-right: 0;
}

.wtd-reflection-item.wtd-admin-reflection .wtd-reflection-content {
    padding-left: 0;
}

/* ================================
   REFLECTION ACTIONS
   ================================ */

.wtd-reflection-actions {
    padding-left: 0;
    margin-top: 15px;
}

.wtd-toggle-replies-btn {
    background: none;
    border: 1px solid #f0ece8;
    padding: 6px 16px;
    border-radius: 20px;
    font-family: 'Manrope', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #6b6b6b;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-right: 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.wtd-toggle-replies-btn:hover {
    border-color: #e5ddd5;
    background: #f0ece8;
    color: #1a1a1a;
}

.wtd-toggle-icon {
    font-size: 16px;
    line-height: 1;
    font-weight: 600;
    transition: transform 0.2s ease;
}

.wtd-toggle-replies-btn.expanded .wtd-toggle-icon {
    transform: rotate(45deg);
}

.wtd-reply-btn {
    background: none;
    border: 1px solid #f0ece8;
    padding: 8px 20px;
    border-radius: 20px;
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #6b6b6b;
    cursor: pointer;
    transition: all 0.2s ease;
}

.wtd-reply-btn:hover {
    border-color: #e5ddd5;
    background: #f0ece8;
    color: #1a1a1a;
}

/* ================================
   THREADED REPLIES
   ================================ */

.wtd-reflection-replies {
    margin-top: 30px;
    margin-left: 40px;
}

.wtd-reflection-item.wtd-reflection-reply {
    padding-left: 25px;
    border-left: none;
    margin-left: 0;
}

.wtd-reflection-reply .wtd-reflection-content,
.wtd-reflection-reply .wtd-reflection-actions {
    padding-left: 0;
}

/* Limit nesting visual depth - everything beyond depth 2 stays flat */
.wtd-depth-1 { margin-left: 0; }
.wtd-depth-2 { margin-left: 0; }
.wtd-depth-3 { margin-left: 0; }

/* ================================
   LOADING STATES
   ================================ */

.wtd-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 60px 20px;
    font-family: 'Manrope', sans-serif;
    font-size: 16px;
    color: #a8a8a8;
}

.wtd-loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #f0ece8;
    border-top-color: #6b6b6b;
    border-radius: 50%;
    animation: wtd-spin 0.8s linear infinite;
}

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

/* ================================
   LOAD MORE
   ================================ */

.wtd-load-more-wrapper {
    padding: 20px 50px 50px;
    text-align: center;
    background: transparent;
    border-top: none;
}

.wtd-load-more-btn {
    background: #f0ece8;
    border: 1px solid #e5ddd5;
    padding: 12px 40px;
    border-radius: 25px;
    font-family: 'Manrope', sans-serif;
    font-size: 15px;
    font-weight: 300;
    color: #6b6b6b;
    cursor: pointer;
    transition: all 0.3s ease;
}

.wtd-load-more-btn:hover {
    background: #e5ddd5;
    color: #1a1a1a;
    transform: translateY(-1px);
}

/* ================================
   RESPONSIVE DESIGN
   ================================ */

/* Tablet */
@media (max-width: 1024px) {
    .wtd-pause-reflect-section .container {
        min-width: auto;
        max-width: 100%;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .wtd-pause-reflect-section .container {
        min-width: auto;
        max-width: 100%;
        padding: 0 20px;
    }
    
    .wtd-reflections-wrapper {
        border-radius: 15px;
        box-shadow: none;
    }
    
    .wtd-reflections-header,
    .wtd-reflection-form-wrapper,
    .wtd-reflections-list {
        padding: 30px 25px;
    }
    
    .wtd-load-more-wrapper {
        padding: 30px 25px;
    }
    
    .wtd-reflections-title {
        font-size: 24px;
        gap: 8px;
    }
    
    .wtd-reflection-count {
        font-size: 16px;
    }
    
    .wtd-section-chevron {
        font-size: 18px;
    }
    
    .wtd-sort-toggle-wrapper {
        padding: 0 25px 15px;
        text-align: right;
    }
    
    .wtd-toggle-track {
        width: 60px;
        height: 28px;
    }
    
    .wtd-toggle-knob {
        width: 22px;
        height: 22px;
    }
    
    .wtd-clock-icon {
        width: 12px;
        height: 12px;
    }
    
    .wtd-sort-toggle[data-order="asc"] .wtd-toggle-knob {
        left: 35px;
    }
    
    .wtd-reflection-content,
    .wtd-reflection-actions {
        padding-left: 0;
    }
    
    .wtd-reflection-replies {
        margin-left: 20px;
    }
    
    .wtd-depth-2 { margin-left: 20px; }
    .wtd-depth-3 { margin-left: 40px; }
    
    .wtd-reflection-item.wtd-admin-reflection {
        padding: 20px 15px;
    }
    
    .wtd-reflection-textarea {
        font-size: 15px;
        padding: 15px;
    }
}
