/**
 * Repalbe Voice & Notice - Frontend CSS
 */

/* Theme Reset Scoped */
.repvn-root, .repvn-root * { box-sizing: border-box; }
.repvn-root h2, .repvn-root h3, .repvn-root h4, .repvn-root p {
    margin: 0; padding: 0; border: none; background: none; box-shadow: none; font-weight: inherit; line-height: 1.6;
}
.repvn-root h2::before, .repvn-root h2::after, .repvn-root h3::before, .repvn-root h3::after, .repvn-root h4::before, .repvn-root h4::after {
    content: none !important; display: none !important;
}

/* Container */
.repvn-voice-container { width: 100%; margin: 24px auto; position: relative; }

/* Grid Layout (Desktop Defaults: 1~5 Columns with Center Alignment) */
/* Grid Layout */
.repvn-layout-grid .repvn-voice-track { 
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px; 
    width: 100%;
}

.repvn-voice-card {
    display: flex;
    flex-direction: column;
    float: none !important;
    box-sizing: border-box;
}

/* Desktop PC Columns (1 to 5) */
.repvn-cols-pc-1 .repvn-voice-card { width: 100% !important; max-width: 680px; }
.repvn-cols-pc-2 .repvn-voice-card { width: calc(50% - 10px); }
.repvn-cols-pc-3 .repvn-voice-card { width: calc(33.333% - 14px); }
.repvn-cols-pc-4 .repvn-voice-card { width: calc(25% - 15px); }
.repvn-cols-pc-5 .repvn-voice-card { width: calc(20% - 16px); }

/* Mobile SP Columns (1 to 3) */
@media (max-width: 768px) {
    .repvn-layout-grid .repvn-voice-track {
        gap: 12px;
    }
    .repvn-cols-sp-1 .repvn-voice-card { width: 100% !important; max-width: 100% !important; }
    .repvn-cols-sp-2 .repvn-voice-card { width: calc(50% - 6px) !important; }
    .repvn-cols-sp-3 .repvn-voice-card { width: calc(33.333% - 8px) !important; }
}

/* Base Card Style */
.repvn-voice-card {
    width: 100%;
    display: flex;
    flex-direction: column;
    float: none !important;
}

/* Preset: Modern Card */
.repvn-preset-modern .repvn-voice-card {
    background: #ffffff; border: 1px solid #e2e8f0; border-radius: 14px; padding: 22px; box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}

/* Preset: Balloon (Speech Bubble on Top, Author on Bottom) */
.repvn-preset-balloon .repvn-voice-card {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.repvn-preset-balloon .repvn-voice-card__inner {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 22px 24px;
    position: relative;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

/* Balloon Tail (Triangle pointing down towards the author) */
.repvn-preset-balloon .repvn-voice-card__inner::before {
    content: "" !important;
    display: block !important;
    position: absolute;
    bottom: -11px;
    left: 32px;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 11px solid #e2e8f0;
    z-index: 1;
}

.repvn-preset-balloon .repvn-voice-card__inner::after {
    content: "" !important;
    display: block !important;
    position: absolute;
    bottom: -9px;
    left: 32px;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid #f8fafc;
    z-index: 2;
}

/* Author positioned cleanly under the tail */
.repvn-preset-balloon .repvn-voice-author {
    border-top: none;
    padding-top: 0;
    padding-left: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Preset: Minimal Border */
.repvn-preset-minimal .repvn-voice-card {
    background: transparent; border: 2px solid #0f172a; border-radius: 0; padding: 18px;
}

/* Card Elements */
.repvn-voice-rating { color: #f59e0b; font-size: 15px; margin-bottom: 8px; letter-spacing: 2px; }
.repvn-voice-title { font-size: 16px !important; font-weight: 700 !important; color: #0f172a; margin-bottom: 8px !important; }
.repvn-voice-content { color: #475569; font-size: 13.5px; margin-bottom: 16px; flex-grow: 1; }
.repvn-voice-author { display: flex; align-items: center; gap: 10px; border-top: 1px solid #f1f5f9; padding-top: 12px; }
.repvn-voice-author__avatar img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; display: block; }
.repvn-voice-author__name { font-weight: 700; color: #0f172a; font-size: 13.5px; }
.repvn-voice-author__sub { font-size: 11.5px; color: #64748b; }

/* Single Spotlight View */
.repvn-layout-single .repvn-voice-card { max-width: 650px; margin: 0 auto; }

/* Slider Layout with Mouse Drag & Hidden Scrollbar */
.repvn-layout-slider .repvn-voice-track {
    display: flex; 
    gap: 20px; 
    overflow-x: auto; 
    scroll-snap-type: x mandatory; 
    scroll-behavior: smooth; 
    -webkit-overflow-scrolling: touch; 
    padding: 10px 0 16px 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
}
.repvn-layout-slider .repvn-voice-track::-webkit-scrollbar {
    display: none;
}
.repvn-layout-slider .repvn-voice-track.is-dragging {
    cursor: grabbing !important;
    scroll-snap-type: none !important;
    scroll-behavior: auto !important;
}

.repvn-layout-slider .repvn-voice-card {
    scroll-snap-align: center;
    scroll-snap-stop: always;
    box-sizing: border-box;
    pointer-events: auto;
}
.repvn-layout-slider .repvn-voice-track.is-dragging .repvn-voice-card {
    pointer-events: none;
}

/* PC Slider Item Widths (Exact fit per column setting) */
.repvn-cols-pc-1.repvn-layout-slider .repvn-voice-card { flex: 0 0 100% !important; max-width: 100% !important; }
.repvn-cols-pc-2.repvn-layout-slider .repvn-voice-card { flex: 0 0 calc(50% - 10px) !important; max-width: calc(50% - 10px) !important; }
.repvn-cols-pc-3.repvn-layout-slider .repvn-voice-card { flex: 0 0 calc(33.333% - 14px) !important; max-width: calc(33.333% - 14px) !important; }
.repvn-cols-pc-4.repvn-layout-slider .repvn-voice-card { flex: 0 0 calc(25% - 15px) !important; max-width: calc(25% - 15px) !important; }
.repvn-cols-pc-5.repvn-layout-slider .repvn-voice-card { flex: 0 0 calc(20% - 16px) !important; max-width: calc(20% - 16px) !important; }

/* Mobile (SP) Slider Item Widths */
@media (max-width: 768px) {
    .repvn-cols-sp-1.repvn-layout-slider .repvn-voice-card { flex: 0 0 100% !important; max-width: 100% !important; }
    .repvn-cols-sp-2.repvn-layout-slider .repvn-voice-card { flex: 0 0 calc(50% - 6px) !important; max-width: calc(50% - 6px) !important; }
    .repvn-cols-sp-3.repvn-layout-slider .repvn-voice-card { flex: 0 0 calc(33.333% - 6px) !important; max-width: calc(33.333% - 6px) !important; }
}

.repvn-slider-nav { display: flex; justify-content: flex-end; gap: 8px; margin-bottom: 12px; }
.repvn-nav-btn {
    width: 36px; height: 36px; border-radius: 50%; border: 1px solid #cbd5e1; background: #ffffff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; font-size: 20px;
}

/* Pagination Dots */
.repvn-slider-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
}
.repvn-slider-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #cbd5e1;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}
.repvn-slider-dot.is-active {
    background: #2563eb;
    transform: scale(1.3);
}
.repvn-preset-salon .repvn-slider-dot.is-active {
    background: #475569;
}

/* Notices Base Container */
.repvn-notice-container { width: 100%; margin: 20px 0; }

/* Single Frame List & Accordion Layout */
.repvn-notice-frame {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    overflow: hidden;
}

.repvn-notice-row {
    border-bottom: 1px solid #f1f5f9;
    padding: 14px 20px;
    transition: background 0.15s ease;
}
.repvn-notice-row:last-child { border-bottom: none; }

.repvn-notice-row__head {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.repvn-layout-accordion .repvn-notice-row__head {
    cursor: pointer;
    user-select: none;
}

.repvn-notice-date { font-size: 13px; color: #64748b; font-weight: 600; flex-shrink: 0; }
.repvn-notice-badge {
    font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 4px; background: #3b82f6; color: #ffffff; flex-shrink: 0;
}
.repvn-notice-title { font-size: 14.5px !important; font-weight: 600 !important; color: #0f172a; flex-grow: 1; }
.repvn-notice-link { color: inherit; text-decoration: none; }
.repvn-notice-link:hover { text-decoration: underline; }

.repvn-accordion-icon {
    width: 8px; height: 8px; border-right: 2px solid #94a3b8; border-bottom: 2px solid #94a3b8; transform: rotate(45deg); transition: transform 0.2s; margin-left: auto; flex-shrink: 0;
}
.repvn-notice-row.is-open .repvn-accordion-icon {
    transform: rotate(-135deg);
}

.repvn-notice-content { font-size: 13.5px; color: #475569; margin-top: 8px; line-height: 1.6; }
.repvn-layout-accordion .is-accordion-body {
    display: none; padding-top: 6px; border-top: 1px dashed #f1f5f9; margin-top: 10px;
}

/* Individual Cards (Box Layout) */
.repvn-layout-box { display: flex; flex-direction: column; gap: 12px; }
.repvn-notice-box { border-radius: 10px; padding: 14px 18px; border-left: 5px solid #3b82f6; background: #eff6ff; color: #1e3a8a; }
.repvn-notice-box__inner { display: flex; align-items: flex-start; gap: 14px; }
.repvn-notice-box__body { flex-grow: 1; }
.repvn-notice-dismiss { background: none; border: none; font-size: 20px; cursor: pointer; color: inherit; opacity: 0.6; }

/* Color Types */
.repvn-notice-type-success .repvn-notice-badge { background: #10b981; }
.repvn-notice-type-warning .repvn-notice-badge { background: #f59e0b; }
.repvn-notice-type-alert .repvn-notice-badge { background: #ef4444; }

.repvn-layout-box .repvn-notice-type-success { border-left-color: #10b981; background: #ecfdf5; color: #064e3b; }
.repvn-layout-box .repvn-notice-type-warning { border-left-color: #f59e0b; background: #fffbeb; color: #78350f; }
.repvn-layout-box .repvn-notice-type-alert { border-left-color: #ef4444; background: #fef2f2; color: #7f1d1d; }

/* Banner Bar */
.repvn-layout-banner .repvn-notice-box { border-radius: 0; border-left: none; border-bottom: 2px solid rgba(0,0,0,0.08); padding: 12px 20px; }

.repvn-preset-salon .repvn-voice-card {
    background: #ffffff;
    border: 1px solid #f1f5f9;
    border-radius: 20px;
    padding: 30px 24px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.04), 0 8px 10px -6px rgba(0, 0, 0, 0.02);
    text-align: center;
}

.repvn-preset-salon .repvn-voice-card__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.repvn-preset-salon .repvn-voice-author {
    order: -2;
    border-top: none;
    padding-top: 0;
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.repvn-preset-salon .repvn-voice-author__avatar img {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
    border: 2px solid #ffffff;
}

.repvn-preset-salon .repvn-voice-author__name {
    font-size: 14px;
    color: #475569;
    font-weight: 600;
}

.repvn-preset-salon .repvn-voice-author__sub {
    font-size: 13.5px;
    color: #64748b;
    font-weight: 500;
}

.repvn-preset-salon .repvn-voice-rating {
    order: -1;
    margin-bottom: 12px;
    font-size: 16px;
}

.repvn-preset-salon .repvn-voice-title {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #1e293b;
    margin-bottom: 10px !important;
}

.repvn-preset-salon .repvn-voice-content {
    font-size: 14px;
    line-height: 1.85;
    color: #334155;
    text-align: justify;
    text-justify: inter-ideograph;
    margin-bottom: 0;
}

.repvn-preset-salon .repvn-slider-nav {
    justify-content: center;
    gap: 20px;
    margin-top: 24px;
    margin-bottom: 0;
}

.repvn-preset-salon .repvn-nav-btn {
    width: 44px;
    height: 44px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 10px rgba(0,0,0,0.04);
    font-size: 18px;
    color: #64748b;
}

.repvn-preset-salon .repvn-nav-btn:hover {
    background: #f8fafc;
    color: #0f172a;
}