/* Scratch Card Block Styles */

#kras {
    position: relative;
    z-index: 5;
}
#kras:after {
    content: '';
    width: 100%;
    position: absolute;
    left: 0;
    bottom: 0;
    background: var(--primary);
    height: 80px;
    z-index: -1;
}

.scratch-card-block {

}

.scratch-card-container {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    padding: 50px;
    position: relative;
    background: url(../img/ticketbg.jpg) no-repeat center center;
    background-size: cover;
    border-radius: 32px;
    color: #fff;
    overflow-x: clip;
}
.scratch-card-container .gform_wrapper.gravity-theme a {
    color: #fff;
}
.scratch-card-container .gform_confirmation_message {
    color: #000;
}

    /* Header */
.scratch-card-header {

    margin-bottom: 24px;
}

.scratch-card-title {
    font-size: 2rem;
    color: #fff;
    margin-bottom: 10px;
}

.scratch-card-description {
    color: #fff;
    line-height: 1.6;
    margin-top: 0;
}

/* Content Wrapper - Side by Side Layout */
/* Steps */

.scratch-card-content-wrapper {
    display: grid;
    grid-template-columns: 4fr 6fr;
    gap: 60px;
    align-items: start;
}
/*
.scratch-card-step {
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s;
}

.scratch-card-step.active {
    visibility: visible;
    opacity: 1;
}
*/

/* Form completed state */
.scratch-card-step-form.completed {


}

/* Form Styles */
.scratch-card-form-wrapper {
    max-width: 500px;
    margin: 0 auto;
}

.scratch-card-form .form-field {
    margin-bottom: 20px;
}

.scratch-card-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #fff;
}

.scratch-card-form input[type="text"],
.scratch-card-form input[type="email"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.scratch-card-form input[type="text"]:focus,
.scratch-card-form input[type="email"]:focus {
    outline: none;
    border-color: #4CAF50;
}

.scratch-card-form .checkbox-field {
    display: flex;
    align-items: center;
}

.scratch-card-form .checkbox-field label {
    display: flex;
    align-items: center;
    font-weight: normal;
    margin-bottom: 0;
    cursor: pointer;
}

.scratch-card-form .checkbox-field input[type="checkbox"] {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.scratch-card-submit-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.scratch-card-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.scratch-card-submit-btn:active {
    transform: translateY(0);
}

/* Scratch Cards Section */
.scratch-card-ticket {
    /*
    background: linear-gradient(120deg, #4c3fb8 0%, #d946a8 35%, #ff7e3d 65%, #ffd42e 100%);
    border-radius: 16px;
    padding: 60px 30px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    position: relative;
    border-top: 3px dashed rgba(255, 255, 255, 0.5);
    border-bottom: 3px dashed rgba(255, 255, 255, 0.5);
    border-left: 3px dashed rgba(76, 63, 184, 0.6);
    border-right: 3px dashed rgba(255, 212, 46, 0.6);*/
    padding: 40px 30px;
    border: 2px solid #fff;
    border-radius: 30px;
}

/* Ticket-style perforated edges */
/*
.scratch-card-container:before,
.scratch-card-container:after {
    content: '';
    position: absolute;
    left: -3px;
    right: -3px;
    height: 20px;
    background:
        radial-gradient(circle at 10px 10px, transparent 8px, #fff 8px, #fff 10px, transparent 10px),
        radial-gradient(circle at 30px 10px, transparent 8px, #fff 8px, #fff 10px, transparent 10px),
        radial-gradient(circle at 50px 10px, transparent 8px, #fff 8px, #fff 10px, transparent 10px);
    background-size: 40px 20px;
    background-repeat: repeat-x;
}

.scratch-card-container::before {
    top: -3px;
}

.scratch-card-container::after {
    bottom: -3px;
}*/

.scratch-instructions {
    text-align: center;
    margin-bottom: 30px;
}

.scratch-instructions p {
    font-size: 1.2rem;
    color: #fff;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.scratch-cards-wrapper {
    display: flex;
    justify-content: center;
    gap: 25px;
    flex-wrap: nowrap;
    position: relative;
    z-index: 1;
}

.scratch-card-wrapper {
    display: inline-block;
    position: relative;
}

/* CSS-only tooltip */
.scratch-card-wrapper[data-tooltip]::before,
.scratch-card-wrapper[data-tooltip]::after {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.scratch-card-wrapper[data-tooltip]::before {
    content: attr(data-tooltip);
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.875rem;
    white-space: nowrap;
    z-index: 1000;
}

.scratch-card-wrapper[data-tooltip]::after {
    content: '';
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.9);
    z-index: 1000;
}

.scratch-card-wrapper[data-tooltip]:hover::before,
.scratch-card-wrapper[data-tooltip]:hover::after {
    opacity: 1;
}

/* Hide tooltip when card is not disabled */
.scratch-card-wrapper:has(.scratch-card-item:not(.disabled))::before,
.scratch-card-wrapper:has(.scratch-card-item:not(.disabled))::after {
    display: none;
}


.scratch-card-price-img {
    position: relative;
    z-index: 5;
    width: 300px;
    max-width: 100%;
    display: block;

    margin: 0 auto;
    margin-top: -20px;
}

.scratch-card-item {
    position: relative;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow:
        0 4px 15px rgba(0, 0, 0, 0.2),
        0 0 0 4px rgba(255, 255, 255, 0.4),
        0 0 20px rgba(255, 255, 255, 0.2);
    transition: transform 0.3s, box-shadow 0.3s;
    flex-shrink: 0;
    animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow:
            0 4px 15px rgba(0, 0, 0, 0.2),
            0 0 0 4px rgba(255, 255, 255, 0.4),
            0 0 20px rgba(255, 255, 255, 0.2);
    }
    50% {
        box-shadow:
            0 4px 15px rgba(0, 0, 0, 0.2),
            0 0 0 4px rgba(255, 255, 255, 0.6),
            0 0 30px rgba(255, 255, 255, 0.3);
    }
}

.scratch-card-item:not(.disabled):hover {
    transform: scale(1.08);
    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.3),
        0 0 0 5px rgba(255, 255, 255, 0.8),
        0 0 40px rgba(255, 255, 255, 0.4);
    animation: none;
}

/* Disabled state */
.scratch-card-item.disabled {
    pointer-events: none;
}

.scratch-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    transition: opacity 0.3s;
    pointer-events: none;
}

.scratch-card-item:not(.disabled) .scratch-overlay {
    opacity: 0;
    pointer-events: none;
}

.overlay-text {
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    padding: 10px;
    line-height: 1.3;

    display: none;
}

.scratch-symbol {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    background: white;
    user-select: none;
}

.scratch-canvas {
    position: absolute;
    top: 0;
    left: 0;
    cursor: pointer;
    z-index: 10;
}

/* Loading State */
.scratch-card-loading {
    text-align: center;
    padding: 40px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

/* Error State */
.scratch-card-error {
    text-align: center;
    padding: 20px;
    background: #ffebee;
    border-radius: 8px;
    margin-bottom: 20px;
}

.scratch-card-error .error-message {
    color: #c62828;
    font-weight: 500;
    margin: 0;
}

/* Modal Styles */
.scratch-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scratch-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    animation: fadeIn 0.3s;
}

.scratch-modal-content {
    position: relative;
    background: white;
    border-radius: 16px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.4s;
    z-index: 1;
}

.scratch-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #999;
    transition: color 0.2s;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
}

.scratch-modal-close:hover {
    color: #333;
}

.scratch-modal-body {
    text-align: center;
}

.result-icon {
    width: 150px;
    height: 150px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.result-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.result-icon svg {
    width: 80%;
    height: 80%;
}

.result-title {
    font-size: 2rem;
    margin-bottom: 15px;
    color: #333;
}

.result-message {
    font-size: 1.1rem;
    color: #666;
    line-height: 1.6;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .scratch-card-content-wrapper {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .scratch-card-ticket {

        padding: 30px 10px;
    }
    .scratch-card-container {
        padding: 60px 20px;
    }

    .scratch-card-title {
        font-size: 1.5rem;
    }

    .scratch-cards-wrapper {
        gap: 15px;
        justify-content: center;
    }

    .scratch-card-item {
        width: 100px;
        height: 100px;
    }

    .scratch-card-step-form {
        order: 9;
    }

    .scratch-symbol {
        font-size: 2.5rem;
    }
}

@media (max-width: 480px) {
    .scratch-cards-wrapper {
        gap: 10px;
        flex-wrap: nowrap;
    }

    .scratch-card-item {
        width: 90px;
        height: 90px;
    }

    .scratch-symbol {
        font-size: 2rem;
    }
}
