/**
 * Styles Public - WP Simple Contest
 * Clean, Minimal, Professional & Trustworthy
 * Warm & Approachable Color Palette
 */

/* ─── Design Tokens ─── */
:root {
    /* Primary Colors */
    --wsc-primary: #ab5e63;
    --wsc-primary-light: #d9927f;
    --wsc-primary-dark: #b86a57;
    --wsc-primary-darker: #a85a47;

    /* Semantic Colors */
    --wsc-success: #6ba587;
    --wsc-success-bg: #f0f7f3;
    --wsc-success-text: #2a4d3d;
    --wsc-error: #d97d6e;
    --wsc-error-bg: #fdf5f3;
    --wsc-error-text: #6b2825;
    --wsc-warning: #e8b76f;
    --wsc-warning-bg: #fffbf5;
    --wsc-warning-text: #6b5a2a;

    /* Neutral Colors */
    --wsc-charcoal: #2a2825;
    --wsc-gray-dark: #5a5350;
    --wsc-gray-medium: #8b8680;
    --wsc-gray-secondary: #a89b96;
    --wsc-gray-light: #d4cdc8;
    --wsc-gray-border: #ebe8e6;
    --wsc-cream: #faf8f6;
    --wsc-white: #ffffff;

    /* Typography */
    --wsc-font-display: "Playfair Display", "Times New Roman", serif;
    --wsc-font-body: "Work Sans", "Helvetica Neue", Arial, sans-serif;

    /* Spacing Scale */
    --wsc-space-xs: 6px;
    --wsc-space-sm: 12px;
    --wsc-space-md: 16px;
    --wsc-space-lg: 20px;
    --wsc-space-xl: 24px;
    --wsc-space-2xl: 28px;
    --wsc-space-3xl: 32px;
    --wsc-space-4xl: 36px;
    --wsc-space-5xl: 40px;

    /* Radius */
    --wsc-radius: 4px;

    /* Transitions */
    --wsc-transition: 0.15s ease-out;
    --wsc-transition-slow: 0.3s ease-out;
}

/* ─── Global Reset ─── */
* {
    box-sizing: border-box;
}
/* ─── Container ─── */
.wsc-contest-wrapper {
    max-width: 640px;
    margin: 0 auto;
    padding: var(--wsc-space-5xl);
    background: var(--wsc-white);
    border: 1px solid var(--wsc-gray-border);
    border-radius: var(--wsc-radius);
    position: relative;
    overflow: hidden;
    font-family: var(--wsc-font-body);
    color: var(--wsc-charcoal);
}

.wsc-contest-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--wsc-primary);
}

/* ─── Hero Section ─── */
.wsc-hero {
    margin-bottom: var(--wsc-space-3xl);
}

.wsc-hero-badges {
    display: flex;
    justify-content: center;
    margin-bottom: var(--wsc-space-lg);
}

.wsc-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--wsc-space-xs);
    padding: var(--wsc-space-xs) var(--wsc-space-xl);
    background: var(--wsc-cream);
    border: 1px solid var(--wsc-primary);
    border-radius: 24px;
    font-size: 12px;
    font-weight: 600;
    color: var(--wsc-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.wsc-hero-badge-count {
    font-family: var(--wsc-font-display);
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
    color: var(--wsc-primary);
}

/* ─── Contest Image ─── */
.wsc-contest-image {
    margin-bottom: var(--wsc-space-3xl);
}

.wsc-contest-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 0;
}

/* ─── Header ─── */
.wsc-contest-header {
    margin-bottom: var(--wsc-space-3xl);
}

.wsc-contest-title {
    font-family: var(--wsc-font-display);
    font-size: 32px;
    font-weight: 700;
    color: var(--wsc-charcoal);
    margin: 0 0 var(--wsc-space-lg) 0;
    line-height: 1.2;
    letter-spacing: -0.025em;
}

.wsc-contest-description {
    font-size: 15px;
    line-height: 1.7;
    color: var(--wsc-gray-dark);
    margin: 0;
}

.wsc-contest-description p {
    margin: 0 0 6px 0;
}

.wsc-contest-description p:last-child {
    margin-bottom: 0;
}

/* ─── Prize Highlight ─── */
.wsc-prize-highlight {
    padding: var(--wsc-space-md) var(--wsc-space-lg);
    background: #f3e8e8;
    border: 1px solid rgba(201, 120, 96, 0.2);
    border-radius: var(--wsc-radius);
    margin-top: var(--wsc-space-lg);
}

.wsc-prize-label {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    color: var(--wsc-primary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: var(--wsc-space-xs);
}

.wsc-prize-highlight .wsc-contest-description {
    color: var(--wsc-gray-dark);
    font-weight: 500;
}

/* ─── Messages ─── */
#wsc-message-container {
    margin-bottom: var(--wsc-space-lg);
}

.wsc-message {
    padding: var(--wsc-space-md) var(--wsc-space-lg);
    border-left: 3px solid;
    border-radius: var(--wsc-radius);
    font-size: 14px;
    font-weight: 500;
    animation: wsc-slide-in var(--wsc-transition-slow);
}

.wsc-message.success {
    border-left-color: var(--wsc-success);
    background: var(--wsc-success-bg);
    color: var(--wsc-success-text);
}

.wsc-message.error {
    border-left-color: var(--wsc-error);
    background: var(--wsc-error-bg);
    color: var(--wsc-error-text);
}

.wsc-message.notice {
    border-left-color: var(--wsc-warning);
    background: var(--wsc-warning-bg);
    color: var(--wsc-warning-text);
}

@keyframes wsc-slide-in {
    from {
        opacity: 0;
        transform: translateY(-12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ─── Form Sections ─── */
.wsc-form-section {
    margin-bottom: var(--wsc-space-3xl);
}

.wsc-form-section h3 {
    font-family: var(--wsc-font-display);
    font-size: 18px;
    font-weight: 700;
    color: var(--wsc-charcoal);
    margin: 0 0 var(--wsc-space-lg) 0;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.wsc-form-section-note {
    margin: calc(var(--wsc-space-sm) * -1) 0 var(--wsc-space-lg) 0;
    font-size: 12px;
    line-height: 1.45;
    color: var(--wsc-gray-dark);
}

/* ─── Form Fields ─── */
.wsc-form-field {
    margin-bottom: var(--wsc-space-lg);
}

.wsc-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--wsc-space-xs);
}

.wsc-form-field label {
    font-size: 13px;
    font-weight: 600;
    color: var(--wsc-gray-dark);
    text-transform: uppercase;
}

.wsc-required {
    color: var(--wsc-error);
    font-weight: 700;
}

.wsc-form-field input[type="text"],
.wsc-form-field input[type="email"],
.wsc-form-field textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--wsc-gray-light);
    border-radius: var(--wsc-radius);
    font-size: 15px;
    color: var(--wsc-charcoal);
    background: var(--wsc-cream);
    font-family: inherit;
    transition: border-color var(--wsc-transition), background-color var(--wsc-transition);
}

.wsc-form-field input[type="text"]::placeholder,
.wsc-form-field input[type="email"]::placeholder,
.wsc-form-field textarea::placeholder {
    color: var(--wsc-gray-secondary);
}

.wsc-form-field input[type="text"]:hover,
.wsc-form-field input[type="email"]:hover,
.wsc-form-field textarea:hover {
    border-color: var(--wsc-primary);
    background: var(--wsc-white);
}

.wsc-form-field input[type="text"]:focus,
.wsc-form-field input[type="email"]:focus,
.wsc-form-field textarea:focus {
    outline: none;
    border-color: var(--wsc-primary);
    background: var(--wsc-white);
}

.wsc-form-field textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.6;
}

/* ─── Radio Buttons (Multiple Choice) ─── */
.wsc-choices {
    display: flex;
    flex-direction: column;
    gap: var(--wsc-space-md);
}

.wsc-choice-label {
    display: flex;
    align-items: center;
    gap: var(--wsc-space-xs);
    padding: var(--wsc-space-md) var(--wsc-space-lg);
    border: 1px solid var(--wsc-gray-border);
    border-radius: var(--wsc-radius);
    background: var(--wsc-cream);
    cursor: pointer;
    transition: border-color var(--wsc-transition), background-color var(--wsc-transition);
    font-size: 14px;
    color: var(--wsc-gray-dark);
    line-height: 1.5;
}

.wsc-choice-label:hover {
    border-color: var(--wsc-primary);
    background: var(--wsc-white);
}

.wsc-choice-label input[type="radio"] {
    margin: 0;
    cursor: pointer;
    flex-shrink: 0;
    accent-color: var(--wsc-primary);
}

.wsc-choice-label input[type="radio"]:focus-visible {
    outline: 2px solid var(--wsc-primary);
    outline-offset: 2px;
}

/* ─── Checkbox Labels ─── */
.wsc-checkbox-label {
    display: flex;
    align-items: center;
    gap: var(--wsc-space-xs);
    cursor: pointer;
    font-size: 14px;
    color: var(--wsc-gray-dark);
    line-height: 1.5;
    font-weight: 400;
}

.wsc-checkbox-label input[type="checkbox"] {
    margin: 0;
    cursor: pointer;
    flex-shrink: 0;
    accent-color: var(--wsc-primary);
}

.wsc-checkbox-label input[type="checkbox"]:focus-visible {
    outline: 2px solid var(--wsc-primary);
    outline-offset: 2px;
}

.wsc-checkbox-helper-text {
    margin: var(--wsc-space-xs) 0 0 28px;
    font-size: 12px;
    line-height: 1.45;
    color: var(--wsc-gray-secondary);
}

/* ─── Rules Section ─── */
.wsc-rules-section {
    background: var(--wsc-cream);
    padding: var(--wsc-space-lg);
    border: 1px solid var(--wsc-gray-border);
    border-radius: var(--wsc-radius);
    margin-bottom: var(--wsc-space-2xl);
}

.wsc-rules-section details {
    margin-bottom: var(--wsc-space-lg);
}

.wsc-rules-section details:last-child {
    margin-bottom: 0;
}

.wsc-rules-section summary {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    color: var(--wsc-primary);
    text-decoration: underline;
    text-underline-offset: 2px;
    user-select: none;
    list-style: none;
    transition: color var(--wsc-transition);
}

.wsc-rules-section summary::-webkit-details-marker {
    display: none;
}

.wsc-rules-section summary:hover {
    color: #1f5422;
}

.wsc-rules-section summary::after {
    content: '';
}

.wsc-rules-section details[open] summary::after {
    content: '';
}

.wsc-rules-content {
    padding: var(--wsc-space-sm) 0 0;
    font-size: 13px;
    line-height: 1.7;
    color: var(--wsc-gray-dark);
}

.wsc-rules-content p {
    margin: 0 0 6px 0;
}

.wsc-rules-content p:last-child {
    margin-bottom: 0;
}

/* ─── Submit Button ─── */
.wsc-form-actions {
    text-align: center;
    margin-top: var(--wsc-space-3xl);
}

.wsc-submit-btn {
    background: #2e7d32;
    color: var(--wsc-cream);
    border: none;
    padding: 14px 48px;
    font-size: 16px;
    font-weight: 700;
    font-family: var(--wsc-font-display);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    border-radius: var(--wsc-radius);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--wsc-space-md);
    min-width: 200px;
    position: relative;
    overflow: hidden;
    transition: background-color var(--wsc-transition);
}

.wsc-submit-btn:hover:not(:disabled) {
    background: #27682a;
}

.wsc-submit-btn:active:not(:disabled) {
    background: #1f5422;
}

.wsc-submit-btn:disabled {
    background: var(--wsc-gray-light);
    cursor: not-allowed;
}

.wsc-submit-btn .wsc-btn-text,
.wsc-submit-btn .wsc-btn-loader {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ─── Spinner ─── */
.wsc-spinner {
    animation: wsc-spin 1.4s linear infinite;
    width: 20px;
    height: 20px;
}

.wsc-spinner .path {
    stroke: var(--wsc-cream);
    stroke-linecap: round;
    animation: wsc-dash 1.5s ease-in-out infinite;
}

@keyframes wsc-spin {
    100% {
        transform: rotate(360deg);
    }
}

@keyframes wsc-dash {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }
    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}

/* ─── Success Content ─── */
.wsc-success-content {
    text-align: center;
    padding: var(--wsc-space-5xl) var(--wsc-space-xl);
}

.wsc-success-icon {
    width: 64px;
    height: 64px;
    background: var(--wsc-success);
    border-radius: var(--wsc-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--wsc-space-xl);
    animation: wsc-fade-in 0.4s ease-out;
}

.wsc-success-icon svg {
    width: 32px;
    height: 32px;
    stroke: var(--wsc-white);
    stroke-width: 2.5;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

@keyframes wsc-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.wsc-success-content h3 {
    font-family: var(--wsc-font-display);
    font-size: 24px;
    font-weight: 700;
    color: var(--wsc-charcoal);
    margin: 0 0 var(--wsc-space-xs) 0;
    letter-spacing: -0.02em;
}

.wsc-success-content p {
    font-size: 15px;
    color: var(--wsc-gray-dark);
    margin: 0 0 var(--wsc-space-3xl) 0;
    line-height: 1.6;
}

/* ─── Social Share ─── */
.wsc-social-share {
    margin-top: var(--wsc-space-3xl);
    padding-top: var(--wsc-space-2xl);
    border-top: 1px solid var(--wsc-gray-border);
}

.wsc-share-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--wsc-gray-medium);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 var(--wsc-space-lg) 0;
}

.wsc-share-buttons {
    display: flex;
    gap: var(--wsc-space-md);
    justify-content: center;
    flex-wrap: wrap;
}

.wsc-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: 24px;
    text-decoration: none;
    color: #ffffff !important;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: opacity var(--wsc-transition);
}

.wsc-share-btn:hover {
    opacity: 0.85;
    color: #ffffff !important;
}

.wsc-share-btn:active {
    opacity: 1;
    color: #ffffff !important;
}

.wsc-share-btn svg {
    fill: #ffffff;
}

.wsc-share-facebook {
    background: #1877f2;
}

.wsc-share-twitter {
    background: #000000;
}

.wsc-share-whatsapp {
    background: #25d366;
}

/* ─── Question Spacing ─── */
.wsc-question {
    position: relative;
    padding: var(--wsc-space-md) var(--wsc-space-lg);
    background: var(--wsc-cream);
    border: 1px solid var(--wsc-gray-border);
    border-radius: var(--wsc-radius);
    transition: border-color var(--wsc-transition);
    overflow: visible;
}

.wsc-question-number-badge {
    position: absolute;
    top: -12px;
    left: -12px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #ab5e63;
    color: var(--wsc-white);
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
    z-index: 2;
}

.wsc-question:hover {
    border-color: var(--wsc-primary);
}

.wsc-question label {
    font-weight: 600;
    color: var(--wsc-charcoal);
    text-transform: none;
    letter-spacing: normal;
}

/* ─── Newsletter Opt-in ─── */
.wsc-form-section .wsc-checkbox-label {
    padding: var(--wsc-space-md) var(--wsc-space-lg);
    background: var(--wsc-cream);
    border: 1px solid var(--wsc-gray-border);
    border-radius: var(--wsc-radius);
    transition: border-color var(--wsc-transition), background-color var(--wsc-transition);
}

.wsc-form-section .wsc-checkbox-label:hover {
    background: var(--wsc-white);
    border-color: var(--wsc-primary);
}

.wsc-rules-section .wsc-form-field .wsc-checkbox-label {
    padding: 0;
    background: none;
    border: none;
    text-transform: none;
    letter-spacing: normal;
}

.wsc-rules-section .wsc-form-field .wsc-checkbox-label:hover {
    background: none;
    border: none;
}

/* ─── Validation States ─── */
.wsc-form-field input:invalid:not(:placeholder-shown),
.wsc-form-field textarea:invalid:not(:placeholder-shown) {
    border-color: var(--wsc-error);
    background: var(--wsc-error-bg);
}

.wsc-form-field input:valid:not(:placeholder-shown),
.wsc-form-field textarea:valid:not(:placeholder-shown) {
    border-color: var(--wsc-success);
}

/* ─── Responsive Design ─── */
@media (max-width: 768px) {
    .wsc-contest-wrapper {
        padding: var(--wsc-space-xl);
        border-radius: 2px;
    }

    .wsc-contest-wrapper::before {
        height: 2px;
    }

    .wsc-hero {
        margin-bottom: var(--wsc-space-2xl);
    }

    .wsc-hero-badges {
        margin-bottom: var(--wsc-space-lg);
    }

    .wsc-contest-title {
        font-size: 26px;
    }

    .wsc-form-section h3 {
        font-size: 16px;
        margin-bottom: var(--wsc-space-lg);
    }

    .wsc-form-field {
        margin-bottom: var(--wsc-space-2xl);
    }

    .wsc-submit-btn {
        width: 100%;
        padding: 14px var(--wsc-space-xl);
    }

    .wsc-share-buttons {
        flex-direction: column;
        gap: var(--wsc-space-md);
    }

    .wsc-share-btn {
        width: 100%;
    }

    .wsc-success-content {
        padding: var(--wsc-space-3xl) var(--wsc-space-lg);
    }
}

@media (max-width: 600px) {
    .wsc-form-row {
        grid-template-columns: 1fr;
        gap: var(--wsc-space-lg);
    }

    .wsc-contest-title {
        font-size: 24px;
    }

    .wsc-form-section h3 {
        font-size: 14px;
    }
}

/* ─── Print Styles ─── */
@media print {
    .wsc-submit-btn,
    .wsc-social-share {
        display: none;
    }

    .wsc-contest-wrapper {
        border: 1px solid #ddd;
    }
}
