/* Contest Modal Overlay */
.k123-contest-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

/* Modal Container */
.k123-contest-modal {
    background: #fff;
    border-radius: 12px;
    max-width: 580px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

/* Close Button */
.k123-contest-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #666;
    line-height: 1;
    padding: 0;
    z-index: 10;
}

.k123-contest-close:hover {
    color: #333;
}

/* Header */
.k123-contest-header {
    text-align: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f0f0f0;
}

.k123-contest-header h3 {
    font-size: 22px;
    color: #333;
    margin: 0 0 8px 0;
}

.k123-contest-header p {
    font-size: 16px;
    color: #555;
    margin: 0;
}

.k123-contest-header strong {
    color: #e67e22;
}

/* Form Fields */
.k123-contest-field {
    margin-bottom: 18px;
}

.k123-contest-field label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
}

.k123-contest-field .required {
    color: #e74c3c;
}

.k123-contest-field input[type="text"],
.k123-contest-field input[type="email"],
.k123-contest-field select,
.k123-contest-field textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    color: #333;
    background: #fff;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.k123-contest-field input:focus,
.k123-contest-field select:focus,
.k123-contest-field textarea:focus {
    border-color: #e67e22;
    outline: none;
    box-shadow: 0 0 0 2px rgba(230, 126, 34, 0.15);
}

.k123-contest-field input.k123-error,
.k123-contest-field select.k123-error {
    border-color: #e74c3c;
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.15);
}

.k123-contest-field textarea {
    resize: vertical;
    min-height: 80px;
}

/* School Name Display */
.k123-contest-school-name {
    padding: 10px 12px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    font-size: 14px;
    color: #555;
    font-weight: 500;
}

/* Terms Section */
.k123-contest-terms {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
}

.k123-contest-terms h4 {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    margin: 0 0 14px 0;
}

.k123-contest-checkbox {
    margin-bottom: 14px;
}

.k123-contest-checkbox label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: #555;
    line-height: 1.5;
    cursor: pointer;
    font-weight: normal;
}

.k123-contest-checkbox input[type="checkbox"] {
    margin-top: 3px;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}

.k123-contest-checkbox.k123-error label {
    color: #e74c3c;
}

/* Buttons */
.k123-contest-buttons {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    justify-content: center;
}

.k123-contest-buttons .btn {
    padding: 12px 32px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.k123-contest-next,
.k123-contest-submit {
    background: #e67e22;
    color: #fff;
}

.k123-contest-next:hover,
.k123-contest-submit:hover {
    background: #d35400;
}

.k123-contest-prev {
    background: #95a5a6;
    color: #fff;
}

.k123-contest-prev:hover {
    background: #7f8c8d;
}

/* Thank You */
.k123-contest-thankyou-content {
    text-align: center;
    padding: 40px 20px;
}

.k123-contest-thankyou-content h3 {
    font-size: 24px;
    color: #27ae60;
    margin: 0 0 12px 0;
}

.k123-contest-thankyou-content p {
    font-size: 15px;
    color: #555;
    margin: 0 0 24px 0;
}

.k123-contest-close-btn {
    background: #e67e22;
    color: #fff;
    padding: 12px 32px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

.k123-contest-close-btn:hover {
    background: #d35400;
}

/* Winners Announcement Note */
.k123-contest-winners-note {
    font-size: 13px !important;
    color: #666 !important;
    margin: 28px 0 12px 0 !important;
    line-height: 1.6;
}

/* Social Links */
.k123-contest-social-links {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 4px;
}

.k123-contest-social-links a {
    display: inline-flex;
    transition: transform 0.2s, opacity 0.2s;
}

.k123-contest-social-links a:hover {
    transform: scale(1.15);
    opacity: 0.85;
}

/* Error Message */
.k123-contest-error {
    background: #fdf0ef;
    border: 1px solid #e74c3c;
    color: #e74c3c;
    padding: 10px 14px;
    border-radius: 6px;
    margin-top: 12px;
    font-size: 14px;
    text-align: center;
}

/* Loading */
.k123-contest-loading {
    text-align: center;
    padding: 40px 20px;
}

.k123-contest-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f0f0f0;
    border-top: 4px solid #e67e22;
    border-radius: 50%;
    animation: k123-spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

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

.k123-contest-loading p {
    color: #555;
    font-size: 14px;
}

/* ===== Floating Contest Button (mobile only) ===== */
.k123-contest-floating {
    display: none;
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9998;
}

.k123-contest-floating-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #e13668 !important;
    color: #fff;
    border: none;
    padding: 14px 24px;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(225, 54, 104, 0.4);
    transition: background-color 0.2s, transform 0.15s, box-shadow 0.2s;
    letter-spacing: 0.3px;
}

.k123-contest-floating-btn:hover {
    background: #c42d5a !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(225, 54, 104, 0.5);
}

.k123-contest-floating-btn:active {
    transform: translateY(0);
}

.k123-contest-floating-icon {
    font-size: 18px;
    line-height: 1;
}

.k123-contest-floating-text {
    line-height: 1;
}

@media (max-width: 768px) {
    .k123-contest-floating {
        display: block;
        bottom: 100px;
        right: 10px;
    }

    .k123-contest-floating-btn {
        padding: 12px 20px;
        font-size: 14px;
    }
}

/* ===== Contest CTA Card Section ===== */
.k123-contest-cta-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin: 24px 0;
    width: 100%;
    max-width: 100%;
}

.k123-contest-cta-image {
    width: 100%;
    overflow: hidden;
}

.k123-contest-cta-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.k123-contest-cta-body {
    padding: 24px 28px 32px;
}

.k123-contest-cta-title {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 3px 0;
    line-height: 1.3;
}
    
.k123-contest-cta-subtitle {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 12px 0;
    line-height: 1.3;
}

.k123-contest-cta-desc {
    font-size: 15px;
    color: #555;
    line-height: 1.6;
    margin: 0 0 16px 0;
}

.k123-contest-cta-points {
    list-style: disc;
    padding-left: 20px;
    margin: 0 0 28px 0;
}

.k123-contest-cta-points li {
    font-size: 15px;
    color: #333;
    line-height: 1.6;
    margin-bottom: 4px;
}

.k123-contest-cta-action {
    text-align: center;
}

.k123-contest-cta-action .contest-button {
    display: inline-block;
    background: #e13668 !important;
    color: #fff;
    border: none;
    padding: 14px 64px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.15s;
    letter-spacing: 0.3px;
    box-shadow: 0 4px 12px rgba(225, 54, 104, 0.3);
}

.k123-contest-cta-action .contest-button:hover {
    background: #c42d5a !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(225, 54, 104, 0.4);
}

.k123-contest-cta-action .contest-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(225, 54, 104, 0.3);
}

/* Desktop Contest Button (contact-block sidebar) */
.contest-cta-desktop {
    margin-top: 24px;
    margin-bottom: 16px;
    text-align: center;
}

.contest-cta-desktop .contest-button {
    display: inline-block;
    background: #3b5fe0;
    color: #fff;
    border: none;
    padding: 12px 48px;
    border-radius: 25px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.contest-cta-desktop .contest-button:hover {
    background: #2d4ec4;
}

/* Contest Button Styling (for sticky CTA bar) */
.contest-button.sticky {
    background: #3b5fe0;
    color: #fff;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.contest-button.sticky:hover {
    background: #2d4ec4;
}

/* Search results - listing page contest button */
.btn-view-main button.contest-button {
    display: inline-block !important;
    background: #e13668;
    color: #fff !important;
    border: 1px solid #e13668;
    padding: 8px 20px;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all ease-out .3s;
    margin: 15px 5px 15px 0;
    vertical-align: middle;
    line-height: 1.4;
    box-shadow: none;
}

.btn-view-main button.contest-button:hover {
    background: #b91444;
    border-color: #b91444;
}

/* Search results - article page contest button */
.summary-article .btn-article-main button.contest-button {
    background: #e13668;
    color: #fff !important;
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all ease-out .3s;
    float: right;
    margin: 0 5px 0 5px;
    line-height: 1.4;
    box-shadow: none;
}

.summary-article .btn-article-main button.contest-button:hover {
    background: #b91444 !important;
}

/* Shortcode button wrapper */
.contest-button-wrapper {
    margin: 16px 0;
    text-align: center;
}

.contest-button-wrapper .contest-button {
    background: #3b5fe0;
    color: #fff;
    border: none;
    padding: 14px 32px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.contest-button-wrapper .contest-button:hover {
    background: #2d4ec4;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .k123-contest-overlay {
        padding: 10px;
    }

    .k123-contest-modal {
        padding: 20px;
        max-height: 95vh;
        border-radius: 8px;
    }

    .k123-contest-header h3 {
        font-size: 18px;
    }

    .k123-contest-header p {
        font-size: 14px;
    }

    .k123-contest-buttons .btn {
        padding: 10px 24px;
        font-size: 14px;
    }

    .k123-contest-checkbox label {
        font-size: 12px;
    }

    .k123-contest-cta-card {
        max-width: 100%;
        margin: 16px 0;
    }

    .k123-contest-cta-image img {
        height: 160px;
    }

    .k123-contest-cta-body {
        padding: 20px 20px 24px;
    }

    .k123-contest-cta-title {
        font-size: 19px;
    }

    .k123-contest-cta-subtitle {
        font-size: 16px;
    }

    .k123-contest-cta-action .contest-button {
        padding: 12px 48px;
        font-size: 15px;
    }
}
