/* Testimonial Shoutouts Frontend CSS */

/* --- Form Styles --- */
.ts-form-container {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    max-width: 600px;
    margin: 40px auto;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

.ts-form-field label {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    display: block;
}

.ts-form-field input[type="text"],
.ts-form-field input[type="email"],
.ts-form-field input[type="url"],
.ts-form-field textarea,
.ts-form-field select {
    width: 100%;
    padding: 12px;
    border: 1px solid #e1e4e8;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.ts-form-field input:focus,
.ts-form-field textarea:focus {
    border-color: #007cba;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.ts-image-option {
    display: flex;
    gap: 20px;
    margin-bottom: 10px;
    align-items: center;
}

.ts-submit-btn {
    width: 100%;
    background: #111;
    color: #fff;
    font-weight: 600;
    padding: 14px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.2s, transform 0.1s;
}

.ts-submit-btn:hover {
    background: #333;
}

.ts-submit-btn:active {
    transform: translateY(1px);
}

/* --- Wall of Love Styles --- */
.ts-wall-container {
    column-count: 3;
    column-gap: 24px;
    max-width: 1200px;
    margin: 40px auto;
    padding: 20px;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

.ts-card {
    background: #fff;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #eaeaea;
    break-inside: avoid;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s;
    position: relative;
    /* Context for overlay link */
}

/* Stretched Link Overlay */
.ts-card-link-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0;
}

.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

.ts-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.ts-body {
    display: flow-root;
    /* Contains floats */
    margin-bottom: 20px;
}

.ts-avatar {
    float: left;
    margin-right: 15px;
    margin-bottom: 5px;
}

.ts-avatar img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: none;
}

.ts-review-text {
    font-size: 15px;
    line-height: 1.6;
    color: #333;
    font-style: italic;
    /* No clearing, so it wraps */
}

/* Optional Review Title */
.ts-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: #c12068;
    line-height: 1.3;
}

.ts-footer-info {
    clear: both;
    /* Ensure footer sits below float */
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid #f7f7f7;
    flex-wrap: wrap;
}

/* Meta styles mainly for admin or fallback, frontend uses footer-info now */
.ts-meta {
    display: none;
}

.ts-name {
    font-weight: 700;
    font-size: 14px;
    color: #222;
}

.ts-separator {
    color: #ccc;
    font-size: 12px;
}

.ts-role {
    font-size: 14px;
    color: #666;
}

.ts-company-link {
    color: #666;
    text-decoration: none;
    font-weight: 500;
    position: relative;
    /* Above card overlay */
    z-index: 2;
}

.ts-company-link:hover {
    color: #111;
    text-decoration: underline;
}

/* --- Responsive --- */
@media (max-width: 900px) {
    .ts-wall-container {
        column-count: 2;
    }
}

@media (max-width: 600px) {
    .ts-wall-container {
        column-count: 1;
    }

    .ts-form-container {
        padding: 20px;
    }
}

/* --- Marquee Styles --- */
.ts-marquee-container {
    width: 100%;
    overflow: hidden;
    padding: 20px 0;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    display: flex;
    flex-direction: column;
    gap: 0;
    /* background: #000; Removed to allow transparency/customization */
}

/* Row wrapper */
.ts-marquee-row {
    display: flex;
    overflow: hidden;
    user-select: none;
    gap: 0;
    width: 100%;
    /* Add padding to prevent clipping of hover transform */
    padding-top: 4px;
    padding-bottom: 10px;
    /* No need for mask if on dark bg, but good for fade */
    mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
}

.ts-marquee-content {
    flex-shrink: 0;
    display: flex;
    gap: 12px;
    padding-right: 12px;
    counter-reset: item;
    justify-content: flex-start;
    /* min-width: 100%; Removed to allow seamless looping */
}

.ts-scroll-left .ts-marquee-content {
    animation: scroll-left var(--ts-marquee-speed, 60s) linear infinite;
}

.ts-scroll-right .ts-marquee-content {
    animation: scroll-right var(--ts-marquee-speed, 60s) linear infinite;
}

/* Pause on hover (ROW ONLY) */
.ts-marquee-row:hover .ts-marquee-content {
    animation-play-state: paused;
}

@keyframes scroll-left {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-100%);
    }
}

@keyframes scroll-right {
    from {
        transform: translateX(-100%);
    }

    to {
        transform: translateX(0);
    }
}

/* Marquee Card Styles - Dark Theme inspired by OpenClaw */
.ts-marquee-item {
    background: var(--ts-marquee-bg, #ffffff);
    color: var(--ts-marquee-text, #333333);
    border: 1px solid #eaeaea;
    /* Light border for light bg */
    border-radius: 12px;
    padding: 24px;
    width: 350px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    /* Softer shadow */
    transition: transform 0.2s, border-color 0.2s;
}

.ts-marquee-item:hover {
    transform: translateY(-2px);
    border-color: var(--ts-marquee-highlight, #007cba);
    /* Simulate thicker border with shadow to avoid layout shift */
    box-shadow: 0 0 0 1px var(--ts-marquee-highlight, #007cba), 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Header: Avatar + Meta */
.ts-marquee-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.ts-marquee-avatar img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #eaeaea;
}

.ts-marquee-meta {
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.3;
}

.ts-marquee-name {
    color: inherit;
    /* Use text color */
    font-size: 15px;
    font-weight: 600;
}

.ts-marquee-company {
    color: #ff4d4d;
    /* Reddish accent like OpenClaw */
    font-size: 13px;
    font-weight: 500;
}

/* Body: Content */
.ts-marquee-body {
    font-size: 15px;
    color: inherit;
    /* Use text color */
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: 0.9;
    /* Slight opacity for body text */
}

/* Quotes decoration */
.ts-marquee-body::before {
    content: '"';
    color: currentColor;
    opacity: 0.4;
    font-size: 20px;
}

/* --- Form Styles moved from inline --- */
.ts-form-container {
    max-width: 600px;
    margin: 20px auto;
    font-family: sans-serif;
}

.ts-form-field {
    margin-bottom: 15px;
}

.ts-form-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
}

.ts-form-field input[type="text"],
.ts-form-field input[type="email"],
.ts-form-field input[type="url"],
.ts-form-field textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.ts-submit-btn {
    background: #333;
    color: #fff;
    padding: 10px 20px;
    border: none;
    cursor: pointer;
    border-radius: 4px;
}

.ts-submit-btn:hover {
    background: #555;
}

.ts-form-message {
    padding: 10px;
    margin-top: 15px;
    border-radius: 4px;
}

.ts-success-message,
.ts-form-message.ts-success {
    background: #dff0d8;
    color: #3c763d;
    padding: 10px;
    margin-bottom: 20px;
    border-radius: 4px;
    border: 1px solid #d6e9c6;
}

.ts-error-message,
.ts-form-message.ts-error {
    background: #f2dede;
    color: #a94442;
    padding: 10px;
    margin-bottom: 20px;
    border-radius: 4px;
    border: 1px solid #ebccd1;
}

.ts-note {
    font-size: 0.85em;
    color: #666;
    margin-top: 5px;
}