/* ACK Wydarzenia - Frontend */
:root {
    --ack-orange: #E87A2E;
    --ack-orange-dark: #d06a1e;
    --ack-dark: #1a1a1a;
    --ack-gray: #666;
    --ack-light: #f8f8f8;
    --ack-border: #e0e0e0;
    --ack-red: #d63638;
    --ack-green: #00a32a;
    --ack-radius: 12px;
}

/* Wrapper */
.ack-wydarzenie-wrap {
    max-width: 720px;
    margin: 40px auto;
    padding: 0 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Event Header */
.ack-event-header {
    margin-bottom: 32px;
}

.ack-event-badge {
    display: inline-block;
    background: var(--ack-orange);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 6px 16px;
    border-radius: 20px;
    margin-bottom: 16px;
}

.ack-event-title {
    font-size: 36px;
    font-weight: 800;
    color: var(--ack-dark);
    line-height: 1.2;
    margin: 0 0 20px;
}

.ack-event-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}

.ack-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    color: var(--ack-gray);
}

.ack-meta-item svg {
    color: var(--ack-orange);
    flex-shrink: 0;
}

.ack-event-description {
    margin-top: 24px;
    font-size: 15px;
    line-height: 1.7;
    color: var(--ack-gray);
}

.ack-event-description p {
    margin: 0 0 12px;
}

/* Seats Section */
.ack-seats-section {
    background: var(--ack-light);
    border-radius: var(--ack-radius);
    padding: 24px;
    margin-bottom: 32px;
    border: 1px solid var(--ack-border);
}

.ack-seats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.ack-seats-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--ack-dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ack-seats-count {
    font-size: 14px;
    color: var(--ack-green);
    font-weight: 600;
}

.ack-seats-count.is-full {
    color: var(--ack-red);
}

.ack-progress-bar {
    background: var(--ack-border);
    border-radius: 6px;
    height: 10px;
    overflow: hidden;
}

.ack-progress-fill {
    background: var(--ack-orange);
    height: 100%;
    border-radius: 6px;
    transition: width 0.5s ease;
}

.ack-progress-fill.is-full {
    background: var(--ack-red);
}

/* Form Section */
.ack-form-section {
    background: #fff;
    border: 1px solid var(--ack-border);
    border-radius: var(--ack-radius);
    padding: 36px;
}

.ack-form-heading {
    font-size: 24px;
    font-weight: 700;
    color: var(--ack-dark);
    margin: 0 0 8px;
}

.ack-form-subtitle {
    font-size: 14px;
    color: var(--ack-gray);
    margin: 0 0 28px;
}

/* Form Layout */
.ack-form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.ack-form-col {
    flex: 1;
}

.ack-form-col-half {
    flex: 0 0 calc(50% - 10px);
}

.ack-form-col label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--ack-dark);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.ack-form-col label .required {
    color: var(--ack-red);
}

/* CF7 Input Styling */
.ack-wydarzenie-wrap .wpcf7-form-control:not([type="submit"]):not(.wpcf7-acceptance) {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    border: 2px solid var(--ack-border);
    border-radius: 8px;
    background: #fff;
    color: var(--ack-dark);
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
    box-sizing: border-box;
}

.ack-wydarzenie-wrap .wpcf7-form-control:not([type="submit"]):not(.wpcf7-acceptance):focus {
    border-color: var(--ack-orange);
    box-shadow: 0 0 0 3px rgba(232, 122, 46, 0.15);
    outline: none;
}

.ack-wydarzenie-wrap select.wpcf7-form-control {
    appearance: auto;
    cursor: pointer;
}

/* Required info */
.ack-required-info {
    font-size: 13px;
    color: var(--ack-gray);
    margin: 0 0 20px;
}

.ack-required-info .required {
    color: var(--ack-red);
    font-weight: 700;
    margin-right: 4px;
}

/* Consent required label */
.ack-consent-required-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--ack-orange);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 8px;
}

/* Consents */
.ack-form-consents {
    margin-top: 24px;
    margin-bottom: 24px;
}

.ack-form-consent {
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 12px;
    font-size: 12px;
    line-height: 1.6;
    color: var(--ack-gray);
}

.ack-form-consent label {
    display: flex;
    align-items: flex-start;
    gap: 4px;
    cursor: pointer;
}

.ack-rodo-info {
    margin: 8px 0 0 26px;
    font-size: 11px;
    line-height: 1.5;
    color: #999;
}

.ack-consent-optional {
    background: #f9f9f9;
    border: 1px solid var(--ack-border);
    position: relative;
}

.ack-consent-optional::before {
    content: "POLECANA ZGODA";
    position: absolute;
    top: -9px;
    left: 16px;
    background: var(--ack-gray);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 2px 10px;
    border-radius: 10px;
}

.ack-consent-required {
    background: #fff8f0;
    border: 2px solid #E87A2E;
    position: relative;
}

/* Przycisk pobierania regulaminu */
.ack-regulamin-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 12px 0 0 26px;
    padding: 8px 18px;
    background: #fff;
    border: 1.5px solid var(--ack-orange);
    border-radius: 20px;
    color: var(--ack-orange);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 0.3px;
    transition: all 0.2s;
}

.ack-regulamin-btn::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23E87A2E' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/%3E%3Cpolyline points='7 10 12 15 17 10'/%3E%3Cline x1='12' y1='15' x2='12' y2='3'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    flex-shrink: 0;
}

.ack-regulamin-btn:hover {
    background: var(--ack-orange);
    color: #fff !important;
}

.ack-regulamin-btn:hover::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/%3E%3Cpolyline points='7 10 12 15 17 10'/%3E%3Cline x1='12' y1='15' x2='12' y2='3'/%3E%3C/svg%3E");
}

.ack-consent-required::before {
    content: "WYMAGANE";
    position: absolute;
    top: -9px;
    left: 16px;
    background: #E87A2E;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 2px 10px;
    border-radius: 10px;
}

.ack-form-consent .wpcf7-list-item {
    margin: 0;
}

.ack-form-consent input[type="checkbox"] {
    margin-top: 2px;
    margin-right: 8px;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    accent-color: var(--ack-orange);
}

/* Podświetlenie zgody na czerwono przy błędzie walidacji */
.ack-form-consent .wpcf7-not-valid-tip {
    display: block;
    margin-top: 8px;
    padding: 8px 12px;
    background: #fef2f2;
    border: 1px solid #fca5a5;
    border-radius: 6px;
    color: var(--ack-red);
    font-size: 12px;
    font-weight: 600;
}

/* CSS-only: automatyczne podświetlenie po walidacji CF7 (aria-invalid) */
.ack-consent-required:has(.wpcf7-not-valid),
.ack-consent-required:has([aria-invalid="true"]) {
    border: 2px solid var(--ack-red) !important;
    background: #fef2f2 !important;
    animation: ack-shake 0.4s ease;
}

.ack-consent-required:has(.wpcf7-not-valid) label,
.ack-consent-required:has([aria-invalid="true"]) label {
    color: var(--ack-red) !important;
}

.ack-consent-required:has(.wpcf7-not-valid)::before,
.ack-consent-required:has([aria-invalid="true"])::before {
    content: "WYMAGANE - ZAZNACZ!";
    background: var(--ack-red);
}

/* JS-driven fallback */
.ack-consent-error {
    border: 2px solid #d63638 !important;
    background: #fef2f2 !important;
    animation: ack-shake 0.4s ease;
    border-radius: 8px;
    padding: 16px;
    position: relative;
}

.ack-consent-error::before {
    content: "WYMAGANE - ZAZNACZ!";
    position: absolute;
    top: -9px;
    left: 16px;
    background: #d63638;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 2px 10px;
    border-radius: 10px;
}

.ack-consent-error label {
    color: #d63638 !important;
}

@keyframes ack-shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}

/* Submit Button */
.ack-form-submit {
    margin-top: 28px;
}

.ack-btn,
.ack-wydarzenie-wrap input[type="submit"].wpcf7-submit {
    display: inline-block;
    width: 100%;
    padding: 16px 32px;
    background: var(--ack-orange);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ack-btn:hover,
.ack-wydarzenie-wrap input[type="submit"].wpcf7-submit:hover {
    background: var(--ack-orange-dark);
    transform: translateY(-1px);
}

.ack-btn:active,
.ack-wydarzenie-wrap input[type="submit"].wpcf7-submit:active {
    transform: translateY(0);
}

/* CF7 Messages */
.ack-wydarzenie-wrap .wpcf7-response-output {
    border-radius: 8px;
    padding: 16px 20px;
    font-size: 14px;
    margin: 20px 0 0;
}

.ack-wydarzenie-wrap .wpcf7-mail-sent-ok {
    border-color: var(--ack-green);
    background: #e6f4ea;
    color: #137333;
}

.ack-wydarzenie-wrap .wpcf7-not-valid-tip {
    font-size: 12px;
    color: var(--ack-red);
    margin-top: 4px;
}

/* Full Message */
.ack-full-message {
    text-align: center;
    padding: 60px 40px;
    background: var(--ack-light);
    border-radius: var(--ack-radius);
    border: 1px solid var(--ack-border);
}

.ack-full-icon {
    margin-bottom: 20px;
}

.ack-full-message h3 {
    font-size: 22px;
    color: var(--ack-dark);
    margin: 0 0 12px;
}

.ack-full-message p {
    font-size: 15px;
    color: var(--ack-gray);
    max-width: 480px;
    margin: 0 auto 24px;
    line-height: 1.6;
}

.ack-btn-outline {
    display: inline-block;
    padding: 12px 28px;
    border: 2px solid var(--ack-orange);
    color: var(--ack-orange);
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s;
}

.ack-btn-outline:hover,
a.ack-btn-outline:hover {
    background: var(--ack-orange);
    color: #fff !important;
}

/* Success Message */
.ack-success-message {
    text-align: center;
    padding: 60px 40px;
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 50%, #f0fdf4 100%);
    border-radius: var(--ack-radius);
    border: 1px solid #bbf7d0;
    animation: ack-success-fade-in 0.6s ease;
}

.ack-success-ticket {
    display: inline-block;
    margin-bottom: 24px;
    animation: ack-ticket-entrance 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    animation-delay: 0.2s;
}

.ack-success-ticket-inner {
    position: relative;
    background: #fff;
    border: 2px solid var(--ack-orange);
    border-radius: 16px;
    padding: 28px 48px;
    box-shadow: 0 8px 32px rgba(232, 122, 46, 0.15), 0 2px 8px rgba(0,0,0,0.06);
}

.ack-success-ticket-inner::before,
.ack-success-ticket-inner::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #f0fdf4, #ecfdf5);
    border-radius: 50%;
    transform: translateY(-50%);
}

.ack-success-ticket-inner::before {
    left: -11px;
    border-right: 2px solid var(--ack-orange);
}

.ack-success-ticket-inner::after {
    right: -11px;
    border-left: 2px solid var(--ack-orange);
}

.ack-ticket-icon {
    display: block;
    margin: 0 auto 8px;
    animation: ack-ticket-stamp 0.4s ease both;
    animation-delay: 0.7s;
}

.ack-ticket-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--ack-orange);
    margin: 0;
}

.ack-ticket-number {
    font-size: 20px;
    font-weight: 800;
    color: var(--ack-dark);
    margin: 4px 0 0;
    font-family: 'Courier New', monospace;
}

.ack-success-checkmark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--ack-green);
    border-radius: 50%;
    margin: 0 auto 16px;
    animation: ack-check-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    animation-delay: 1s;
}

.ack-success-checkmark svg {
    stroke-dasharray: 24;
    stroke-dashoffset: 24;
    animation: ack-check-draw 0.4s ease forwards;
    animation-delay: 1.2s;
}

.ack-success-message h3 {
    font-size: 24px;
    font-weight: 800;
    color: var(--ack-dark);
    margin: 0 0 8px;
    animation: ack-success-fade-up 0.5s ease both;
    animation-delay: 1.1s;
}

.ack-success-message p {
    font-size: 15px;
    color: var(--ack-gray);
    max-width: 420px;
    margin: 0 auto;
    line-height: 1.6;
    animation: ack-success-fade-up 0.5s ease both;
    animation-delay: 1.3s;
}

.ack-success-email-hint {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    padding: 10px 20px;
    background: #fff;
    border: 1px solid #bbf7d0;
    border-radius: 24px;
    font-size: 13px;
    color: #137333;
    font-weight: 600;
    animation: ack-success-fade-up 0.5s ease both;
    animation-delay: 1.5s;
}

.ack-confetti {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 2px;
    animation: ack-confetti-fall 1.5s ease forwards;
    pointer-events: none;
}

@keyframes ack-success-fade-in {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes ack-ticket-entrance {
    from { opacity: 0; transform: translateY(40px) rotateX(30deg) scale(0.8); }
    to { opacity: 1; transform: translateY(0) rotateX(0) scale(1); }
}

@keyframes ack-ticket-stamp {
    0% { transform: scale(0) rotate(-15deg); opacity: 0; }
    60% { transform: scale(1.3) rotate(5deg); opacity: 1; }
    100% { transform: scale(1) rotate(0); opacity: 1; }
}

@keyframes ack-check-pop {
    from { transform: scale(0); }
    to { transform: scale(1); }
}

@keyframes ack-check-draw {
    to { stroke-dashoffset: 0; }
}

@keyframes ack-success-fade-up {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes ack-confetti-fall {
    0% { opacity: 1; transform: translateY(0) rotate(0deg) scale(1); }
    100% { opacity: 0; transform: translateY(120px) rotate(720deg) scale(0.3); }
}

/* Responsive */
@media (max-width: 600px) {
    .ack-wydarzenie-wrap {
        padding: 0 16px;
        margin: 24px auto;
    }

    .ack-event-title {
        font-size: 26px;
    }

    .ack-form-row {
        flex-direction: column;
        gap: 16px;
    }

    .ack-form-col-half {
        flex: 1;
    }

    .ack-form-section {
        padding: 24px;
    }

    .ack-event-meta {
        flex-direction: column;
        gap: 12px;
    }
}
