/**
 * WooCommerce Category Protector Styles
 * Ispirato all'header del tema De Rosa con supporto background configurabile
 */

/* Reset e base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.wc-category-protect-page {
    font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #fff;
    background-color: #000000;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Header - Ispirato al tema De Rosa */
.wc-cat-protect-header {
    position: relative;
    z-index: 1000;
    background-color: transparent;
}

.wc-cat-protect-header__top {
    background-color: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.wc-cat-protect-header__top__container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 10px 40px;
}

.wc-cat-protect-header__top__center {
    text-align: center;
    font-size: 14px;
    color: #fff;
    font-family: 'DIN Condensed Bold', sans-serif;
    letter-spacing: 0.5px;
}

.wc-cat-protect-header__body {
    padding: 20px 0;
}

.wc-cat-protect-header__body__container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo centrale */
.wc-cat-protect-header__logo {
    flex: 0 0 auto;
    text-align: center;
}

.wc-cat-protect-header__logo img {
    height: 20px;
    width: auto;
    transition: opacity 0.3s ease;
}

/* Selettore lingua (come nel tema) */
.wc-cat-protect-header__lang {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.wc-cat-protect-header__lang__active {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wc-cat-protect-header__lang__active img {
    width: 20px;
    height: auto;
}

.wc-cat-protect-header__lang__other {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 10px;
    background-color: #1A1A1A;
    border: 1px solid rgba(255, 255, 255, 0.1);
    /* border-radius: 4px; */
    list-style: none;
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.wc-cat-protect-header__lang:hover .wc-cat-protect-header__lang__other {
    opacity: 1;
    visibility: visible;
}

.wc-cat-protect-header__lang__other li a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: background-color 0.2s ease;
}

.wc-cat-protect-header__lang__other img {
    width: 20px;
    height: auto;
}

/* Azioni header (ricerca, carrello) */
.wc-cat-protect-header__actions {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.wc-cat-protect-header__actions__list {
    display: flex;
    align-items: center;
    gap: 24px;
    list-style: none;
}

.wc-cat-protect-header__action {
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.wc-cat-protect-header__action svg {
    display: block;
}

.wc-cat-protect-header__action a {
    display: block;
    text-decoration: none;
}

.wc-cat-protect-header__spacer {
    flex: 1;
}

/* Container principale con background configurabile */
.wc-category-protect-container {
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    background-color: #000000;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.wc-category-protect-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #000;
    z-index: 1;
}

.wc-category-protect-box {
    position: relative;
    z-index: 2;
    background: rgba(26, 26, 26, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    /* border-radius: 12px; */
    padding: clamp(40px, 5vw, 50px);
    max-width: 460px;
    width: 100%;
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wc-category-protect-icon {
    text-align: center;
    margin-bottom: 24px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
}

.wc-category-protect-title {
    /* font-family: 'DIN Condensed Bold', -apple-system, BlinkMacSystemFont, sans-serif; */
    text-align: center;
    margin-bottom: 12px;
    font-size: 2.25rem;
    font-weight: 400;
    letter-spacing: 5.14px;
    text-transform: uppercase;
    --tw-text-opacity: 1;
    color: #fff;
}

.wc-category-protect-subtitle {
    font-size: clamp(14px, 2.5vw, 16px);
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    margin-bottom: 32px;
    line-height: 1.6;
}

.wc-category-protect-message {
    display: none;
}

.wc-category-protect-error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
    padding: 14px 18px;
    /* border-radius: 8px; */
    margin-bottom: 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: shake 0.4s ease-in-out;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-10px);
    }

    75% {
        transform: translateX(10px);
    }
}

.wc-category-protect-form {
    display: flex;
    flex-direction: column;
    width: 100%;
    align-items: center;
    gap: 20px;
}

.wc-category-protect-input-wrapper {
    position: relative;
    width: 100%;
}

.wc-category-protect-input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    opacity: 0.5;
}

.wc-category-protect-input {
    width: 100%;
    padding: 16px 16px 16px 48px;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.1);
    /* border-radius: 8px; */
    color: #fff;
    font-size: clamp(14px, 2vw, 16px);
    font-family: 'IBM Plex Sans', sans-serif;
    transition: all 0.3s ease;
    outline: none;
}

.wc-category-protect-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.wc-category-protect-input:focus {
    border-color: #e3342f;
    background: rgba(0, 0, 0, 0.7);
}

.wc-category-protect-button {
    padding: 14px 24px;
    border: none;
    /* border-radius: 4px; */
    color: #fff;
    font-size: .8rem;
    font-weight: 600;
    /* font-family: 'IBM Plex Sans', sans-serif; */
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #ff0022 !important;
    width: fit-content;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .wc-cat-protect-header__body__container {
        padding: 0 30px;
    }

    .wc-cat-protect-header__logo img {
        height: 36px;
    }
}

@media (max-width: 768px) {
    .wc-cat-protect-header__top__container {
        padding: 8px 20px;
    }

    .wc-cat-protect-header__top__center {
        font-size: 12px;
    }

    .wc-cat-protect-header__body__container {
        padding: 0 20px;
    }

    .wc-cat-protect-header__logo img {
        height: 32px;
    }

    .wc-cat-protect-header__lang__active {
        font-size: 12px;
    }

    .wc-cat-protect-header__lang__active img {
        width: 18px;
    }

    .wc-cat-protect-header__actions__list {
        gap: 16px;
    }

    .wc-category-protect-container {
        padding: 40px 16px;
        min-height: calc(100vh - 70px);
    }

    .wc-category-protect-box {
        padding: clamp(30px, 8vw, 40px);
    }
}

@media (max-width: 480px) {
    .wc-cat-protect-header__logo img {
        height: 28px;
    }

    .wc-cat-protect-header__lang {
        font-size: 11px;
    }

    .wc-cat-protect-header__actions__list {
        gap: 12px;
    }

    .wc-cat-protect-header__action svg {
        width: 16px;
        height: 16px;
    }

    .wc-category-protect-box {
        padding: 24px;
    }
}

@media (max-width: 360px) {
    .wc-cat-protect-header__logo img {
        height: 24px;
    }
}

/* Landscape mobile optimization */
@media (max-height: 600px) and (orientation: landscape) {
    .wc-category-protect-container {
        padding: 20px 16px;
        min-height: auto;
    }

    .wc-category-protect-box {
        padding: 20px;
        max-width: 90%;
    }

    .wc-category-protect-icon {
        margin-bottom: 12px;
    }

    .wc-category-protect-icon svg {
        width: 32px;
        height: 32px;
    }

    .wc-category-protect-title {
        margin-bottom: 8px;
    }

    .wc-category-protect-subtitle {
        margin-bottom: 16px;
    }

    .wc-category-protect-form {
        gap: 12px;
    }

    .wc-category-protect-input,
    .wc-category-protect-button {
        padding: 12px 16px;
    }
}