/**
 * VixViu Core Modal System CSS
 * Modal-specific styles for the streamlined modal system
 */

/* ==========================================================================
   MODAL SYSTEM - Plural Classes for Modal System
   ========================================================================== */

/* Modal Wrapper - Fullscreen Overlay */
.vixviu-core-modals-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.vixviu-core-modals-wrapper.open {
    opacity: 1;
    visibility: visible;
}

/* Modal Size Classes */
.vixviu-core-modals-size-auto .vixviu-core-layout-container {
    width: auto;
    height: auto;
    min-width: 300px;
    min-height: 200px;
}

.vixviu-core-modals-size-small .vixviu-core-layout-container {
    width: 400px;
    height: auto;
    min-height: 200px;
}

.vixviu-core-modals-size-medium .vixviu-core-layout-container {
    width: 600px;
    height: auto;
    min-height: 300px;
}

.vixviu-core-modals-size-large .vixviu-core-layout-container {
    width: 800px;
    height: auto;
    min-height: 400px;
}

.vixviu-core-modals-size-fullscreen .vixviu-core-layout-container {
    width: 95vw;
    height: 95vh;
    max-width: none;
    max-height: none;
    margin: 0;
    border-radius: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .vixviu-core-modals-size-small .vixviu-core-layout-container,
    .vixviu-core-modals-size-medium .vixviu-core-layout-container,
    .vixviu-core-modals-size-large .vixviu-core-layout-container {
        width: 95vw;
        height: auto;
        margin: 10px;
    }
}

@media (max-width: 480px) {
    .vixviu-core-modals-wrapper {
        padding: 10px;
    }
    
    .vixviu-core-modals-size-small .vixviu-core-layout-container,
    .vixviu-core-modals-size-medium .vixviu-core-layout-container,
    .vixviu-core-modals-size-large .vixviu-core-layout-container {
        width: 100%;
        height: auto;
        margin: 0;
        border-radius: 4px;
    }
}

/* ==========================================================================
   COLLECTORS CARD STYLES - Generic Collector Card Layout
   ========================================================================== */

/* Collectors Card Wrapper */
.vixviu-core-modals-collectors-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background: #f8f9fa;
    min-height: 400px;
}

/* Main Collectors Card */
.vixviu-core-modals-collectors-card {
    width: 300px;
    height: 420px;
    border: 2px solid #000;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    perspective: 1000px;
    transform-style: preserve-3d;
    transition: transform 0.6s ease;
}

/* Card Sides */
.vixviu-core-modals-collectors-front,
.vixviu-core-modals-collectors-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
}

.vixviu-core-modals-collectors-front {
    z-index: 2;
}

.vixviu-core-modals-collectors-back {
    transform: rotateY(180deg);
    background: #2c5f5f;
    background-image: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 2px,
        rgba(255, 255, 255, 0.1) 2px,
        rgba(255, 255, 255, 0.1) 4px
    );
}

/* Flip States */
.vixviu-core-modals-collectors-card.flipped {
    transform: rotateY(180deg);
}

/* Top Red Section (Header) */
.vixviu-core-modals-collectors-header {
    background: #dc3545;
    background-image: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 2px,
        rgba(255, 255, 255, 0.1) 2px,
        rgba(255, 255, 255, 0.1) 4px
    );
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 15px;
    position: relative;
}

.vixviu-core-modals-collectors-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 0;
    border-left: 0;
    border-right: 30px solid transparent;
    border-bottom: 20px solid #fff;
}

/* Title */
.vixviu-core-modals-collectors-title {
    color: #fff;
    font-weight: bold;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: right;
}

/* Main White Content Area */
.vixviu-core-modals-collectors-content {
    flex: 1;
    background: #fff;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.vixviu-core-modals-collectors-content::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 0;
    border-left: 30px solid transparent;
    border-top: 20px solid #dc3545;
}

/* Image Container */
.vixviu-core-modals-collectors-image-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: #f8f9fa;
    border-radius: 4px;
}

/* Collectors Card Image */
.vixviu-core-modals-collectors-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

/* Image Placeholder */
.vixviu-core-modals-collectors-image-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 14px;
    text-align: center;
}

.vixviu-core-modals-collectors-image-placeholder .dashicons {
    font-size: 48px;
    margin-bottom: 10px;
    opacity: 0.5;
}

/* Bottom Red Section (Footer) */
.vixviu-core-modals-collectors-footer {
    background: #dc3545;
    background-image: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 2px,
        rgba(255, 255, 255, 0.1) 2px,
        rgba(255, 255, 255, 0.1) 4px
    );
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    position: relative;
}

.vixviu-core-modals-collectors-footer::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 0;
    border-left: 30px solid transparent;
    border-top: 20px solid #fff;
}

/* Name */
.vixviu-core-modals-collectors-name {
    color: #fff;
    font-weight: bold;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: left;
}

/* Number */
.vixviu-core-modals-collectors-number {
    color: #fff;
    font-weight: bold;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 2px;
}

.vixviu-core-modals-collectors-number-symbol {
    font-size: 14px;
    opacity: 0.8;
}

.vixviu-core-modals-collectors-number-value {
    font-size: 20px;
}

/* Responsive Design */
@media (max-width: 480px) {
    .vixviu-core-modals-collectors-card {
        width: 280px;
        height: 390px;
    }
    
    .vixviu-core-modals-collectors-header,
    .vixviu-core-modals-collectors-footer {
        height: 50px;
        padding: 0 12px;
    }
    
    .vixviu-core-modals-collectors-title,
    .vixviu-core-modals-collectors-name {
        font-size: 12px;
    }
    
    .vixviu-core-modals-collectors-number {
        font-size: 16px;
    }
    
    .vixviu-core-modals-collectors-number-value {
        font-size: 18px;
    }
}

/* Hover Effects */
.vixviu-core-modals-collectors-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

/* Animation Classes for Motion Integration */
.vixviu-core-modals-collectors-card.motion-pulse {
    animation: collectorsCardPulse 0.6s ease-in-out;
}

.vixviu-core-modals-collectors-card.motion-shake {
    animation: collectorsCardShake 0.5s ease-in-out;
}

.vixviu-core-modals-collectors-card.motion-spin {
    animation: collectorsCardSpin 0.8s ease-in-out;
}

.vixviu-core-modals-collectors-card.motion-flash {
    animation: collectorsCardFlash 0.3s ease-in-out;
}

@keyframes collectorsCardPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes collectorsCardShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

@keyframes collectorsCardSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes collectorsCardFlash {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* ==========================================================================
   COLLECTORS CARD BACK SIDE STYLES
   ========================================================================== */

/* Back Side Header */
.vixviu-core-modals-collectors-back-header {
    background: #4a9d9d;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 15px;
    position: relative;
}

.vixviu-core-modals-collectors-back-title {
    color: #fff;
    font-weight: bold;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
}

/* Back Side Content */
.vixviu-core-modals-collectors-back-content {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Back Side Text */
.vixviu-core-modals-collectors-back-text {
    margin-bottom: 20px;
}

.vixviu-core-modals-collectors-back-text p {
    color: #fff;
    font-size: 12px;
    line-height: 1.4;
    margin: 0;
    text-align: left;
}

/* Expiry Date */
.vixviu-core-modals-collectors-back-expiry {
    margin-bottom: 20px;
    text-align: center;
}

.vixviu-core-modals-collectors-back-expiry-label {
    color: #fff;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.vixviu-core-modals-collectors-back-expiry-value {
    color: #fff;
    font-size: 14px;
    font-weight: bold;
    border: 2px dashed #4a9d9d;
    border-radius: 4px;
    padding: 8px 12px;
    display: inline-block;
    position: relative;
}

.vixviu-core-modals-collectors-back-expiry-value::before,
.vixviu-core-modals-collectors-back-expiry-value::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    background: #4a9d9d;
}

.vixviu-core-modals-collectors-back-expiry-value::before {
    top: -4px;
    left: -4px;
    border-radius: 50% 0 0 0;
}

.vixviu-core-modals-collectors-back-expiry-value::after {
    bottom: -4px;
    right: -4px;
    border-radius: 0 0 50% 0;
}

/* QR Code */
.vixviu-core-modals-collectors-back-qr {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.vixviu-core-modals-collectors-back-qr-code {
    width: 60px;
    height: 60px;
    background: #4a9d9d;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.vixviu-core-modals-collectors-back-qr-code .dashicons {
    font-size: 32px;
}

.vixviu-core-modals-collectors-back-qr-code img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

/* Back Side Footer */
.vixviu-core-modals-collectors-back-footer {
    background: #4a9d9d;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    position: relative;
}

/* Signature Area */
.vixviu-core-modals-collectors-back-signature {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.vixviu-core-modals-collectors-back-signature-label {
    color: #fff;
    font-size: 12px;
    font-style: italic;
    margin-bottom: 2px;
}

.vixviu-core-modals-collectors-back-signature-text {
    color: #fff;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Website */
.vixviu-core-modals-collectors-back-website {
    color: #fff;
    font-size: 10px;
    text-align: center;
    flex: 1;
}

/* Flip Button */
.vixviu-core-modals-collectors-flip-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
}

.vixviu-core-modals-collectors-flip-btn:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: scale(1.1);
}

.vixviu-core-modals-collectors-flip-btn .dashicons {
    font-size: 16px;
}
