/* thevitaminshots Refunds & Returns for WooCommerce — public.css
 * All colors, sizes, and shapes come from CSS custom properties set inline
 * via wp_add_inline_style. This file only defines the shapes and behaviors.
 * License: GPLv2 or later
 */

/* ============ Container ============ */

.tvsret-form {
    /* Default vars in case inline injection fails */
    --tvsret-accent: #F1C349;
    --tvsret-accent-dark: #d4a835;
    --tvsret-accent-text: #1a1a1a;
    --tvsret-bg: #fff;
    --tvsret-page-bg: transparent;
    --tvsret-text: #1a1a1a;
    --tvsret-muted: #666;
    --tvsret-border: #e5e5e5;
    --tvsret-radius: 12px;
    --tvsret-radius-sm: 8px;
    --tvsret-shadow: 0 2px 20px rgba(0,0,0,.06);
    --tvsret-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --tvsret-title-size: 28px;
    --tvsret-title-weight: 700;
    --tvsret-max-width: 640px;
    --tvsret-header-bg: linear-gradient(135deg, #F1C349, #d4a835);

    font-family: var(--tvsret-font);
    color: var(--tvsret-text);
    background: var(--tvsret-page-bg);
    padding: 40px 20px;
    box-sizing: border-box;
}

.tvsret-form *,
.tvsret-form *::before,
.tvsret-form *::after { box-sizing: border-box; }

.tvsret-form.tvsret-align-center .tvsret-card { margin-left: auto; margin-right: auto; }
.tvsret-form.tvsret-align-left   .tvsret-card { margin-left: 0; margin-right: auto; }

/* ============ Card layouts ============ */

.tvsret-card {
    max-width: var(--tvsret-max-width);
    background: var(--tvsret-bg);
    border-radius: var(--tvsret-radius);
    box-shadow: var(--tvsret-shadow);
    overflow: hidden;
    transition: box-shadow .3s ease;
}

.tvsret-form.tvsret-layout-wide .tvsret-card {
    max-width: 100%;
    border-radius: 0;
    box-shadow: none;
}

.tvsret-form.tvsret-layout-minimal .tvsret-card {
    background: transparent;
    box-shadow: none;
    border: 1px solid var(--tvsret-border);
}

/* ============ Header ============ */

.tvsret-header {
    background: var(--tvsret-header-bg);
    color: var(--tvsret-accent-text);
    padding: 32px 32px 28px;
    text-align: center;
    position: relative;
}

.tvsret-form.tvsret-header-minimal .tvsret-header {
    background: var(--tvsret-bg);
    color: var(--tvsret-text);
    border-bottom: 1px solid var(--tvsret-border);
    padding: 24px 32px;
}

.tvsret-header-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    color: var(--tvsret-accent-text);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.tvsret-form.tvsret-header-minimal .tvsret-header-icon {
    background: var(--tvsret-accent);
    color: var(--tvsret-accent-text);
}

.tvsret-header-icon svg {
    width: 30px;
    height: 30px;
}

.tvsret-title {
    margin: 0 0 6px;
    font-size: var(--tvsret-title-size);
    font-weight: var(--tvsret-title-weight);
    line-height: 1.2;
    color: inherit;
    letter-spacing: -0.02em;
}

.tvsret-subtitle {
    margin: 0;
    font-size: 15px;
    opacity: 0.88;
    line-height: 1.5;
    color: inherit;
}

.tvsret-form.tvsret-header-minimal .tvsret-subtitle { color: var(--tvsret-muted); }

/* ============ Body ============ */

.tvsret-body {
    padding: 28px 32px 32px;
}

/* ============ Type tabs ============ */

.tvsret-type-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 24px;
    padding: 6px;
    background: color-mix(in srgb, var(--tvsret-accent) 8%, transparent);
    border-radius: var(--tvsret-radius-sm);
}
@supports not (background: color-mix(in srgb, red, blue)) {
    .tvsret-type-tabs { background: #f6f6f6; }
}

.tvsret-type-tab {
    flex: 1;
    background: transparent;
    border: 0;
    padding: 10px 16px;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    color: var(--tvsret-muted);
    border-radius: calc(var(--tvsret-radius-sm) - 2px);
    transition: all .2s ease;
}

.tvsret-type-tab:hover { color: var(--tvsret-text); }

.tvsret-type-tab.active {
    background: var(--tvsret-bg);
    color: var(--tvsret-accent);
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* ============ Progress indicator ============ */

.tvsret-progress {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    position: relative;
}

.tvsret-progress::before {
    content: '';
    position: absolute;
    top: 14px;
    left: 12%;
    right: 12%;
    height: 2px;
    background: var(--tvsret-border);
    z-index: 0;
}

.tvsret-progress-item {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex: 1;
    color: var(--tvsret-muted);
    transition: color .3s ease;
}

.tvsret-progress-num {
    width: 28px;
    height: 28px;
    background: var(--tvsret-border);
    color: var(--tvsret-muted);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    transition: all .3s ease;
}

.tvsret-progress-label {
    font-size: 12px;
    font-weight: 500;
    text-align: center;
}

.tvsret-progress-item.active { color: var(--tvsret-accent); }
.tvsret-progress-item.active .tvsret-progress-num {
    background: var(--tvsret-accent);
    color: var(--tvsret-accent-text);
    transform: scale(1.1);
}

.tvsret-progress-item.completed .tvsret-progress-num {
    background: var(--tvsret-accent);
    color: var(--tvsret-accent-text);
}

/* Bar-style progress */
.tvsret-form.tvsret-progress-bar .tvsret-progress {
    background: var(--tvsret-border);
    height: 6px;
    border-radius: 3px;
    overflow: hidden;
    padding: 0;
    display: block;
}
.tvsret-form.tvsret-progress-bar .tvsret-progress::before { display: none; }
.tvsret-form.tvsret-progress-bar .tvsret-progress-item {
    display: none;
}
.tvsret-form.tvsret-progress-bar .tvsret-progress-item.active {
    display: block;
    background: var(--tvsret-accent);
    height: 100%;
    width: 33.33%;
    transition: width .4s ease;
}
.tvsret-form.tvsret-progress-bar .tvsret-progress-item[data-step="2"].active { width: 66.66%; }
.tvsret-form.tvsret-progress-bar .tvsret-progress-item[data-step="3"].active { width: 100%; }
.tvsret-form.tvsret-progress-bar .tvsret-progress-num,
.tvsret-form.tvsret-progress-bar .tvsret-progress-label { display: none; }

/* Dots-style progress */
.tvsret-form.tvsret-progress-dots .tvsret-progress::before { display: none; }
.tvsret-form.tvsret-progress-dots .tvsret-progress-item {
    flex: 0;
    padding: 0 6px;
}
.tvsret-form.tvsret-progress-dots .tvsret-progress-num {
    width: 10px;
    height: 10px;
    font-size: 0;
}
.tvsret-form.tvsret-progress-dots .tvsret-progress-label { display: none; }
.tvsret-form.tvsret-progress-dots .tvsret-progress {
    justify-content: center;
    gap: 8px;
}

/* ============ Steps & fields ============ */

.tvsret-step-title {
    margin: 0 0 20px;
    font-size: 18px;
    font-weight: 600;
    color: var(--tvsret-text);
}

.tvsret-field {
    display: block;
    margin-bottom: 18px;
}

.tvsret-field-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}
.tvsret-field-row .tvsret-field { margin-bottom: 0; }

.tvsret-field-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--tvsret-muted);
    margin-bottom: 6px;
}

.tvsret-form input[type="text"],
.tvsret-form input[type="email"],
.tvsret-form input[type="url"],
.tvsret-form textarea,
.tvsret-form select {
    width: 100%;
    min-width: 0;
    min-height: 48px;
    height: auto;
    line-height: 1.4;
    padding: 12px 14px;
    box-sizing: border-box;
    vertical-align: middle;
    border: 1px solid var(--tvsret-border);
    border-radius: var(--tvsret-radius-sm);
    font-family: inherit;
    font-size: 14px;
    color: var(--tvsret-text);
    background: var(--tvsret-bg);
    transition: border-color .2s ease, box-shadow .2s ease;
}

/* Keep the reason selector readable when the active theme applies global select styles. */
.tvsret-form select.tvsret-input-reason {
    display: block;
    min-height: 48px;
    height: auto;
    max-width: 100%;
    line-height: 1.45;
    padding: 11px 40px 11px 14px;
    white-space: normal;
}
.tvsret-form select.tvsret-input-reason option {
    line-height: 1.5;
    white-space: normal;
}

.tvsret-form input:focus,
.tvsret-form textarea:focus,
.tvsret-form select:focus {
    outline: none;
    border-color: var(--tvsret-accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--tvsret-accent) 20%, transparent);
}
@supports not (background: color-mix(in srgb, red, blue)) {
    .tvsret-form input:focus,
    .tvsret-form textarea:focus,
    .tvsret-form select:focus {
        box-shadow: 0 0 0 3px rgba(241, 195, 73, 0.2);
    }
}

.tvsret-form textarea {
    resize: vertical;
    min-height: 88px;
}

/* Filled field style */
.tvsret-form.tvsret-field-filled input[type="text"],
.tvsret-form.tvsret-field-filled input[type="email"],
.tvsret-form.tvsret-field-filled input[type="url"],
.tvsret-form.tvsret-field-filled textarea,
.tvsret-form.tvsret-field-filled select {
    background: color-mix(in srgb, var(--tvsret-border) 40%, var(--tvsret-bg));
    border-color: transparent;
}
@supports not (background: color-mix(in srgb, red, blue)) {
    .tvsret-form.tvsret-field-filled input,
    .tvsret-form.tvsret-field-filled textarea,
    .tvsret-form.tvsret-field-filled select {
        background: #f5f5f5;
        border-color: transparent;
    }
}

/* Underlined field style */
.tvsret-form.tvsret-field-underlined input[type="text"],
.tvsret-form.tvsret-field-underlined input[type="email"],
.tvsret-form.tvsret-field-underlined input[type="url"],
.tvsret-form.tvsret-field-underlined textarea,
.tvsret-form.tvsret-field-underlined select {
    border: 0;
    border-bottom: 2px solid var(--tvsret-border);
    border-radius: 0;
    padding-left: 0;
    padding-right: 0;
    background: transparent;
}
.tvsret-form.tvsret-field-underlined input:focus,
.tvsret-form.tvsret-field-underlined textarea:focus,
.tvsret-form.tvsret-field-underlined select:focus {
    box-shadow: none;
    border-bottom-color: var(--tvsret-accent);
}

/* ============ Buttons ============ */

.tvsret-actions {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.tvsret-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    border: 0;
    border-radius: var(--tvsret-radius-sm);
    cursor: pointer;
    transition: transform .1s ease, box-shadow .2s ease, background .2s ease;
    text-decoration: none;
}

.tvsret-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.tvsret-btn:not(:disabled):active { transform: translateY(1px); }

.tvsret-btn-primary {
    background: var(--tvsret-accent);
    color: var(--tvsret-accent-text);
}
.tvsret-btn-primary:hover:not(:disabled) {
    background: var(--tvsret-accent-dark);
    box-shadow: 0 4px 12px color-mix(in srgb, var(--tvsret-accent) 40%, transparent);
}
@supports not (background: color-mix(in srgb, red, blue)) {
    .tvsret-btn-primary:hover:not(:disabled) {
        box-shadow: 0 4px 12px rgba(241, 195, 73, 0.4);
    }
}

.tvsret-btn-secondary {
    background: transparent;
    color: var(--tvsret-text);
    border: 1px solid var(--tvsret-border);
}
.tvsret-btn-secondary:hover:not(:disabled) {
    background: color-mix(in srgb, var(--tvsret-border) 50%, transparent);
}
@supports not (background: color-mix(in srgb, red, blue)) {
    .tvsret-btn-secondary:hover:not(:disabled) { background: #f5f5f5; }
}

/* Gradient buttons */
.tvsret-form.tvsret-button-gradient .tvsret-btn-primary {
    background: linear-gradient(135deg, var(--tvsret-accent) 0%, var(--tvsret-accent-dark) 100%);
}

/* Outlined buttons */
.tvsret-form.tvsret-button-outlined .tvsret-btn-primary {
    background: transparent;
    border: 2px solid var(--tvsret-accent);
    color: var(--tvsret-accent);
}
.tvsret-form.tvsret-button-outlined .tvsret-btn-primary:hover:not(:disabled) {
    background: var(--tvsret-accent);
    color: var(--tvsret-accent-text);
}

/* ============ Order summary ============ */

.tvsret-order-summary {
    background: color-mix(in srgb, var(--tvsret-border) 30%, var(--tvsret-bg));
    border: 1px solid var(--tvsret-border);
    padding: 18px;
    border-radius: var(--tvsret-radius-sm);
    margin-bottom: 20px;
    font-size: 14px;
}
@supports not (background: color-mix(in srgb, red, blue)) {
    .tvsret-order-summary { background: #f9f9f9; }
}

.tvsret-order-summary h4 { margin: 0 0 8px; font-size: 15px; color: var(--tvsret-text); }
.tvsret-order-summary ul { margin: 8px 0 0; padding: 0 0 0 20px; }
.tvsret-order-summary li { color: var(--tvsret-muted); margin-bottom: 4px; }

/* ============ Refund breakdown ============ */

.tvsret-refund-breakdown {
    margin: 20px 0;
    border: 1px solid var(--tvsret-border);
    border-radius: var(--tvsret-radius-sm);
    overflow: hidden;
}
.tvsret-refund-table { width: 100%; border-collapse: collapse; }
.tvsret-refund-table td { padding: 12px 16px; border-top: 1px solid var(--tvsret-border); color: var(--tvsret-text); }
.tvsret-refund-table tr:first-child td { border-top: 0; }
.tvsret-refund-table td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.tvsret-refund-line td {
    background: color-mix(in srgb, var(--tvsret-accent) 12%, transparent);
    font-size: 15px;
}
@supports not (background: color-mix(in srgb, red, blue)) {
    .tvsret-refund-line td { background: #fdf5dc; }
}

/* ============ Messages ============ */

.tvsret-messages {
    display: none;
    padding: 12px 16px;
    border-radius: var(--tvsret-radius-sm);
    margin-bottom: 18px;
    font-size: 14px;
    border-left: 4px solid;
}
.tvsret-messages.tvsret-msg-error {
    display: block;
    background: #fef2f2;
    color: #991b1b;
    border-color: #dc2626;
}
.tvsret-messages.tvsret-msg-success {
    display: block;
    background: #f0fdf4;
    color: #14532d;
    border-color: #16a34a;
}

/* ============ Success state ============ */

.tvsret-step-success { text-align: center; padding: 24px 0; }
.tvsret-success-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 16px;
    color: #16a34a;
}
.tvsret-success-icon svg { width: 100%; height: 100%; }
.tvsret-success-message {
    color: var(--tvsret-muted);
    font-size: 15px;
    line-height: 1.6;
    margin: 0 auto;
    max-width: 400px;
}

/* ============ Footer ============ */

.tvsret-footer {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--tvsret-border);
    font-size: 13px;
    color: var(--tvsret-muted);
    text-align: center;
}

/* ============ Animations ============ */

.tvsret-form.tvsret-animate .tvsret-step:not([hidden]) {
    animation: tvsret-fade-in .35s ease;
}

@keyframes tvsret-fade-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ============ Photo upload ============ */

.tvsret-photos-field { margin-bottom: 18px; }

.tvsret-photo-dropzone {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-start;
}

.tvsret-photo-pick-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: transparent;
    border: 2px dashed var(--tvsret-border);
    border-radius: var(--tvsret-radius-sm);
    color: var(--tvsret-muted);
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all .2s ease;
}

.tvsret-photo-pick-btn:hover {
    border-color: var(--tvsret-accent);
    color: var(--tvsret-accent);
}

.tvsret-photo-previews {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tvsret-photo-preview {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: var(--tvsret-radius-sm);
    overflow: hidden;
    background: color-mix(in srgb, var(--tvsret-border) 40%, var(--tvsret-bg));
    border: 1px solid var(--tvsret-border);
}
@supports not (background: color-mix(in srgb, red, blue)) {
    .tvsret-photo-preview { background: #f5f5f5; }
}

.tvsret-photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.tvsret-photo-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(0,0,0,0.65);
    color: #fff;
    border: 0;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.tvsret-photo-remove:hover { background: rgba(220,38,38,0.85); }

.tvsret-photo-uploading {
    display: flex;
    align-items: center;
    justify-content: center;
}

.tvsret-photo-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--tvsret-border);
    border-top-color: var(--tvsret-accent);
    border-radius: 50%;
    animation: tvsret-spin 0.8s linear infinite;
}

@keyframes tvsret-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* ============ Order dropdown (email_only mode) ============ */

.tvsret-lookup-select select {
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
    font-size: 13px;
}

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

@media (max-width: 540px) {
    .tvsret-form { padding: 20px 12px; }
    .tvsret-header { padding: 24px 20px; }
    .tvsret-body { padding: 20px; }
    .tvsret-title { font-size: 22px; }
    .tvsret-field-row { grid-template-columns: 1fr; }
    .tvsret-actions { flex-direction: column; }
    .tvsret-actions .tvsret-btn { width: 100%; }
    .tvsret-progress-label { font-size: 11px; }
}
