/**
 * PR Promotions Frontend Styles
 * Styles for promotion modals and banners displayed to visitors
 */

/* Modal Styles */
.pr-promotion-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    display: none;
}

.pr-promotion-modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.pr-promotion-modal__container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 90vw;
    max-height: 90vh;
    overflow: auto;
}

.pr-promotion-modal__content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.pr-promotion-modal__close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pr-promotion-modal__close:hover {
    background: white;
    transform: scale(1.1);
}

.pr-promotion-modal__close span {
    color: #333;
    font-weight: bold;
}

/* Image Modal Styles */
.pr-promotion-modal--modal-image .pr-promotion-modal__content {
    max-width: 600px;
}

.pr-promotion-modal__image {
    text-align: center;
    padding: 0;
}

.pr-promotion-modal__image img {
    max-width: 100%;
    height: auto;
    display: block;
}

.pr-promotion-modal__text {
    padding: 30px;
    text-align: center;
}

.pr-promotion-modal__title {
    margin: 0 0 15px 0;
    font-size: 24px;
    font-weight: 600;
    color: #333;
}

.pr-promotion-modal__description {
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* Background Modal Styles */
.pr-promotion-modal--modal-background .pr-promotion-modal__content {
    max-width: 500px;
    min-height: 400px;
}

.pr-promotion-modal__background {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 400px;
    position: relative;
}

.pr-promotion-modal__overlay-content {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 40px 30px;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
}

.pr-promotion-modal--modal-background .pr-promotion-modal__title {
    color: white;
    margin-bottom: 20px;
    font-size: 28px;
    font-weight: 700;
}

.pr-promotion-modal--modal-background .pr-promotion-modal__description {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 30px;
    font-size: 16px;
}

/* Call to Action */
.pr-promotion-modal__actions {
    padding: 0 30px 30px;
    text-align: center;
}

.pr-promotion-modal__cta {
    display: inline-block;
    padding: 15px 30px;
    background-color: #007cba;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.pr-promotion-modal__cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    color: white;
    text-decoration: none;
}

/* Banner Styles */
.pr-promotion-banner {
    position: relative;
    width: 100%;
    background-color: #007cba;
    color: white;
    z-index: 999998;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-100%);
    transition: transform 0.4s ease;
}

.pr-promotion-banner.is-visible {
    transform: translateY(0);
}

.pr-promotion-banner__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.pr-promotion-banner__content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 60px;
    padding: 15px 0;
}

.pr-promotion-banner__text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.pr-promotion-banner__title {
    font-weight: 700;
    font-size: 18px;
    line-height: 1.2;
}

.pr-promotion-banner__description {
    font-size: 14px;
    line-height: 1.4;
    opacity: 0.9;
}

.pr-promotion-banner__actions {
    margin: 0 20px;
    flex-shrink: 0;
}

.pr-promotion-banner__cta {
    display: inline-block;
    padding: 10px 20px;
    background-color: #ffffff;
    color: #333;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.pr-promotion-banner__cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    color: #333;
    text-decoration: none;
}

.pr-promotion-banner__dismiss {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.pr-promotion-banner__dismiss:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    transform: scale(1.1);
}

.pr-promotion-banner__dismiss span {
    font-weight: bold;
}

/* Body states */
body.pr-modal-open {
    overflow: hidden;
}

body.has-pr-banner {
    padding-top: 60px;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .pr-promotion-modal__container {
        max-width: 95vw;
        max-height: 95vh;
    }
    
    .pr-promotion-modal--modal-image .pr-promotion-modal__content {
        max-width: 95vw;
    }
    
    .pr-promotion-modal--modal-background .pr-promotion-modal__content {
        max-width: 95vw;
    }
    
    .pr-promotion-modal__text,
    .pr-promotion-modal__overlay-content {
        padding: 20px;
    }
    
    .pr-promotion-modal__title {
        font-size: 20px;
    }
    
    .pr-promotion-modal__cta {
        padding: 12px 24px;
        font-size: 14px;
    }
    
    .pr-promotion-banner__container {
        padding: 0 15px;
    }
    
    .pr-promotion-banner__content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
        padding: 20px 0;
    }
    
    .pr-promotion-banner__text {
        order: 1;
    }
    
    .pr-promotion-banner__actions {
        order: 2;
        margin: 0;
    }
    
    .pr-promotion-banner__dismiss {
        order: 3;
        align-self: flex-end;
        margin-top: -15px;
    }
    
    .pr-promotion-banner__title {
        font-size: 16px;
    }
    
    .pr-promotion-banner__description {
        font-size: 13px;
    }
    
    .pr-promotion-banner__cta {
        padding: 8px 16px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .pr-promotion-banner__content {
        padding: 15px 0;
    }
    
    .pr-promotion-banner__title {
        font-size: 15px;
    }
    
    .pr-promotion-banner__description {
        font-size: 12px;
    }
}

/* Animation */
.pr-promotion-modal {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.pr-promotion-modal.is-visible {
    opacity: 1;
    visibility: visible;
}

.pr-promotion-modal__container {
    transform: translate(-50%, -50%) scale(0.8);
    transition: transform 0.3s ease;
}

.pr-promotion-modal.is-visible .pr-promotion-modal__container {
    transform: translate(-50%, -50%) scale(1);
}

/* Focus management */
.pr-promotion-modal__close:focus,
.pr-promotion-banner__dismiss:focus,
.pr-promotion-modal__cta:focus,
.pr-promotion-banner__cta:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .pr-promotion-modal__close {
        border: 2px solid #333;
    }
    
    .pr-promotion-banner__dismiss {
        border: 2px solid white;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .pr-promotion-modal,
    .pr-promotion-modal__container,
    .pr-promotion-banner {
        transition: none;
    }
    
    .pr-promotion-modal__cta:hover,
    .pr-promotion-banner__cta:hover,
    .pr-promotion-modal__close:hover,
    .pr-promotion-banner__dismiss:hover {
        transform: none;
    }
}
