/* Secret Santa Plugin Styles */

.secret-santa-hidden {
    display: none !important;
}

.secret-santa-visible {
    display: block !important;
}

/* Trigger Link */
#secret-santa-trigger {
    position: absolute;
    right: 20px;
    right: 2rem;
    background: linear-gradient(135deg, #c41e3a 0%, #165b33 100%);
    color: white;
    padding: 12px 20px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    font-size: 16px;
    box-shadow: 0 4px 15px rgba(196, 30, 58, 0.4);
    z-index: 9;
    transition: all 0.3s ease;
    animation: santaPulse 2s ease-in-out infinite;
}

#secret-santa-trigger.secret-santa-trigger--image {
    background: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    animation: none;
}

#secret-santa-trigger.secret-santa-trigger--image img {
    display: block;
    max-width: 150px;
    height: auto;
    transition: all 0.3s ease;
}

#secret-santa-trigger:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(196, 30, 58, 0.6);
    text-decoration: none;
    color: white;
}

#secret-santa-trigger.secret-santa-trigger--image:hover {
    box-shadow: none;
}

@keyframes santaPulse {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(196, 30, 58, 0.4);
    }
    50% {
        box-shadow: 0 4px 25px rgba(196, 30, 58, 0.8);
    }
}

/* Modal Container */

#secret-santa-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    animation: santaFadeIn 0.3s ease-in-out;
}

@keyframes santaFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.secret-santa-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.secret-santa-modal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    /* background: linear-gradient(135deg, #c41e3a 0%, #165b33 100%); */
    background-color: #009480;
    padding: 2rem;
    /* padding: 1.5rem; */
    border-radius: 20px;
    /* border-radius: 0; */
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    max-width: 500px;
    width: 90%;
    animation: santaSlideUp 0.5s ease-out;
}

.secret-santa-modal--form {
    max-width: 600px;
    max-width: 410px;
    max-height: 90vh;
    overflow-y: auto;
    /* Custom green scrollbar */
    &::-webkit-scrollbar {
        width: 5px;
        background: #e6f9f4;
    }

    &::-webkit-scrollbar-thumb {
        background: linear-gradient(135deg, #165b33 0%, #009480 100%);
        border-radius: 8px;
    }

    &::-webkit-scrollbar-thumb:hover {
        background: #165b33;
    }

    scrollbar-color: #009480 #e6f9f4;
    scrollbar-width: thin;
}

@keyframes santaSlideUp {
    from {
        transform: translate(-50%, -40%);
        opacity: 0;
    }
    to {
        transform: translate(-50%, -50%);
        opacity: 1;
    }
}

.secret-santa-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 30px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    line-height: 1;
    padding: 0;
}

.secret-santa-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.secret-santa-content {
    text-align: center;
    color: white;
}

.secret-santa-icon {
    font-size: 80px;
    margin-bottom: 1rem;
    animation: santaBounce 1s ease-in-out infinite;
}

.secret-santa-icon--image {
    font-size: inherit;
    /* max-width: 180px;
    margin-left: auto;
    margin-right: auto; */
    animation: none;
}

.secret-santa-icon--image img {
    max-width: 150px;
    height: auto;
    display: block;
    margin: 0 auto;
}

@keyframes santaBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.secret-santa-title {
    font-size: 2.3rem;
    font-weight: bold;
    margin: 1rem 0 2rem 0;
    color: white;
    /* text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3); */
}

.secret-santa-button {
    display: inline-block;
    background: white;
    color: #c41e3a;
    padding: 15px 40px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    font-size: 18px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.secret-santa-button:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    color: #c41e3a;
    text-decoration: none;
}

/* Gravity Form Styling */
.secret-santa-form {
    margin-top: 2rem;
}

.secret-santa-form .gform_wrapper {
    background: white;
    background: none;
    padding: 2rem;
    padding: 0;
    border-radius: 10px;
    margin: 0;
}

.secret-santa-form .gform_wrapper form {
    margin: 0;
}

.secret-santa-form .gfield_label {
    color: #333;
    font-weight: bold;
}

.secret-santa-form input[type="text"],
.secret-santa-form input[type="email"],
.secret-santa-form input[type="tel"],
.secret-santa-form textarea,
.secret-santa-form select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.secret-santa-form .gform_button {
    background: #c41e3a !important;
    color: white !important;
    padding: 12px 30px !important;
    border: none !important;
    border-radius: 50px !important;
    font-weight: bold !important;
    font-size: 16px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
}

.secret-santa-form .gform_button:hover {
    background: #a01830 !important;
    transform: scale(1.05);
}

.secret-santa-form .btn 
{
    width: 100%;
}

.secret-santa-form .gform_confirmation_message {
    color: #333;
    color: white;
    font-weight: bold;
    text-align: center;
    padding: 1rem;
    font-size: 1.3rem;
    line-height: 1.1;
}

/* Ad Popup Styles */
#secret-santa-ad {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999998;
    animation: santaFadeIn 0.3s ease-in-out;
}

.secret-santa-ad-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.secret-santa-ad-modal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #c41e3a 0%, #165b33 100%);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    max-width: 500px;
    width: 90%;
    animation: santaSlideUp 0.5s ease-out;
}

.secret-santa-ad-modal--image-only {
    background: transparent;
    padding: 0;
    /* max-width: 90%; */
    /* max-height: 90vh; */
    width: 320px;
}

.secret-santa-ad-modal--image-only .secret-santa-ad-close {
    background: rgba(0, 0, 0, 0.6);
    top: 10px;
    right: 10px;

    background: rgba(255, 255, 255, 0.2);
    color: white;

        /* position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 30px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s 
ease;
    line-height: 1;
    padding: 0; */


}

.secret-santa-ad-modal--image-only .secret-santa-ad-close:hover {
    background: rgba(0, 0, 0, 0.8);
    background: rgba(255, 255, 255, 0.3);
}

.secret-santa-ad-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 30px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    line-height: 1;
    padding: 0;
    z-index: 9;
}

.secret-santa-ad-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.secret-santa-ad-content {
    text-align: center;
    color: white;
}

.secret-santa-ad-icon {
    font-size: 80px;
    margin-bottom: 1rem;
    animation: santaBounce 1s ease-in-out infinite;
}

.secret-santa-ad-image {
    margin-bottom: 1.5rem;
}

.secret-santa-ad-image img {
    max-width: 100%;
    height: auto;
    max-height: 200px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.secret-santa-ad-image-full {
    position: relative;
}

.secret-santa-ad-image-full img {
    /* max-width: 100%;
    max-height: 90vh; */
    height: auto;
    /* width: auto; */
    width: 320px;
    display: block;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.secret-santa-ad-title {
    font-size: 28px;
    font-weight: 600;
    font-family: serif;
    font-size: 2rem;
    margin: 1rem 0;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.secret-santa-ad-message {
    font-size: 16px;
    line-height: 1.6;
    margin: 1.5rem 0 2rem 0;
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.secret-santa-ad-button {
    display: inline-block;
    background: white;
    color: #c41e3a;
    padding: 15px 40px;
    border: none;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.secret-santa-ad-button:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.secret-santa-modal.secret-santa-modal--form:before {
    content: '';
    display: block;
    width: 100%;
    height: 100%;
    position: absolute;
    top:  0;
    left: 0;
    background-image: url('/wp-content/plugins/secret-santa/assets/img/snow-bg.png');
    background-size: 120% auto;
    background-repeat: repeat-x;
    mix-blend-mode: screen;
    pointer-events: none;
}

/* Responsive */
@media (max-width: 600px) {

    #secret-santa-trigger {
        right: 1rem;
    }
    #secret-santa-trigger.secret-santa-trigger--image img {
        max-width: 110px;
    }
    .secret-santa-modal {
        padding: 2rem;
        padding: 1.5rem;
    }
    
    .secret-santa-icon {
        font-size: 60px;
    }
    
    .secret-santa-title {
        font-size: 22px;
    }
    
    .secret-santa-button {
        font-size: 16px;
        padding: 12px 30px;
    }
    
    .secret-santa-form .gform_wrapper {
        padding: 1.5rem;
        padding: 0;
    }
    
    .secret-santa-ad-modal {
        padding: 2rem;
    }

    .secret-santa-ad-modal--image-only
    {
        padding: 0;
    }
    
    .secret-santa-ad-icon {
        font-size: 60px;
    }
    
    .secret-santa-ad-title {
        font-size: 22px;
        font-size: 2rem;
    }
    
    .secret-santa-ad-message {
        font-size: 15px;
    }
    
    .secret-santa-ad-button {
        font-size: 16px;
        padding: 12px 30px;
    }
}
