/**
 * Unified Gaming Styler CSS
 * 
 * Gaming-themed styles for the unified license display interface.
 *
 * @package Woodmart_Child
 * @version 2.0.0
 */

/* ==========================================================================
   Gaming Container Styles
   ========================================================================== */

.unified-gaming-container {
    background-color: #2a332a;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #084208;
    width: 100%;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

.unified-gaming-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 255, 0, 0.02) 0%, rgba(8, 66, 8, 0.05) 100%);
    pointer-events: none;
}

.unified-gaming-container.loaded {
    animation: containerFadeIn 0.5s ease-in-out;
}

@keyframes containerFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   Title Styles
   ========================================================================== */

.unified-gaming-title {
    color: #00ff00;
    font-size: 20px;
    margin: 0 0 15px 0;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.3);
    position: relative;
    z-index: 1;
}

/* ==========================================================================
   Button Styles
   ========================================================================== */

.unified-download-container {
    margin-bottom: 15px;
}

.download-btn,
.view-order-btn {
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: linear-gradient(135deg, #00ff00 0%, #00bb00 100%) !important;
    padding: 15px 30px !important;
    text-decoration: none !important;
    font-weight: bold !important;
    border-radius: 8px !important;
    color: #0d100d !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 15px rgba(0, 255, 0, 0.3) !important;
    position: relative;
    overflow: hidden;
}

.download-btn:hover,
.view-order-btn:hover {
    background: linear-gradient(135deg, #00dd00 0%, #009900 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 255, 0, 0.4) !important;
}

.download-btn.clicked,
.view-order-btn.clicked {
    transform: translateY(0) scale(0.95);
}

.download-btn::after,
.view-order-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
}

.download-btn:active::after,
.view-order-btn:active::after {
    width: 200px;
    height: 200px;
}

/* ==========================================================================
   Table Styles
   ========================================================================== */

.unified-table-wrapper {
    overflow-x: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.unified-license-table {
    width: 100% !important;
    border-collapse: collapse !important;
    background-color: #171c17 !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    border: 1px solid #084208 !important;
    margin: 20px 0 !important;
}

.unified-table-header {
    padding: 20px !important;
    text-align: left !important;
    background: linear-gradient(135deg, #171c17 0%, #1a201a 100%) !important;
    color: #00ff00 !important;
    font-weight: bold !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    font-size: 16px !important;
    border: 1px solid #084208 !important;
    position: relative;
}

.unified-table-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, #00ff00 50%, transparent 100%);
}

.unified-table-row {
    background-color: rgba(23, 28, 23, 0.9) !important;
    transition: background-color 0.2s ease;
}

.unified-table-row:hover {
    background-color: rgba(42, 51, 42, 0.6) !important;
}

.unified-table-cell {
    border: 1px solid #084208 !important;
    padding: 20px !important;
    color: #ffffff !important;
    font-size: 14px !important;
    line-height: 1.6 !important;
    position: relative;
}

/* ==========================================================================
   License Code Box Styles
   ========================================================================== */

.license-code-box {
    background: linear-gradient(135deg, #171c17 0%, #2a332a 100%);
    border: 1px solid #00ff00;
    border-radius: 5px;
    padding: 12px;
    margin: 8px 0;
    font-family: 'Courier New', Monaco, 'Lucida Console', monospace;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(0, 255, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.license-code-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(0, 255, 0, 0.1) 50%, transparent 100%);
    transition: left 0.5s ease;
}

.license-code-box:hover::before {
    left: 100%;
}

.license-code-box:hover {
    border-color: #00ff88;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.2);
    transform: translateY(-1px);
}

.license-code-content {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
}

.license-code-content strong {
    color: #00ff00 !important;
    font-weight: bold !important;
    margin-right: 8px;
    flex-shrink: 0;
}

.license-code-content span {
    color: #ffffff;
    word-break: break-all;
    font-family: inherit;
}

/* ==========================================================================
   Copy Button Styles
   ========================================================================== */

.copy-button {
    cursor: pointer;
    font-size: 16px;
    color: #00ff00;
    opacity: 0.7;
    transition: all 0.3s ease;
    margin-left: 12px;
    padding: 6px;
    border-radius: 3px;
    flex-shrink: 0;
    background: transparent;
    border: none;
    outline: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.copy-button:hover {
    opacity: 1;
    background-color: rgba(0, 255, 0, 0.1);
    transform: scale(1.1);
}

.copy-button.copy-success {
    color: #00ff00;
    animation: copySuccess 0.3s ease;
}

.copy-button.copy-error {
    color: #ff0000;
    animation: copyError 0.3s ease;
}

@keyframes copySuccess {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

@keyframes copyError {
    0% { transform: translateX(0); }
    25% { transform: translateX(-3px); }
    75% { transform: translateX(3px); }
    100% { transform: translateX(0); }
}

/* ==========================================================================
   Expiration Info Styles
   ========================================================================== */

.expiration-info {
    margin: 8px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.4;
    padding: 6px 10px;
    background-color: rgba(255, 102, 0, 0.1);
    border-radius: 4px;
    border-left: 3px solid #ff6600;
}

.expiration-info strong {
    color: #ff6600 !important;
    font-weight: bold !important;
    margin-right: 8px;
}

.expiration-info span {
    color: #ffffff;
}

/* ==========================================================================
   Copy Instructions Styles
   ========================================================================== */

.copy-instructions {
    margin-top: 15px;
    padding: 15px;
    background: linear-gradient(135deg, rgba(0, 255, 0, 0.08) 0%, rgba(0, 255, 0, 0.12) 100%);
    border-radius: 6px;
    border-left: 4px solid #00ff00;
    position: relative;
}

.copy-instructions h4 {
    color: #00ff00 !important;
    margin: 0 0 10px 0 !important;
    font-size: 14px !important;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.copy-instructions ul {
    margin: 0 !important;
    padding-left: 20px !important;
    color: #ffffff !important;
    font-size: 13px !important;
    line-height: 1.5;
}

.copy-instructions li {
    margin-bottom: 4px;
    position: relative;
}

.copy-instructions li::marker {
    color: #00ff00;
}

/* ==========================================================================
   View Order Container
   ========================================================================== */

.unified-view-order-container {
    margin-top: 25px;
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(8, 66, 8, 0.5);
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media only screen and (max-width: 768px) {
    .unified-gaming-container {
        padding: 15px !important;
        margin: 10px 0 !important;
    }
    
    .unified-gaming-title {
        font-size: 16px !important;
        text-align: center !important;
        margin-bottom: 10px !important;
    }
    
    .unified-license-table {
        font-size: 12px !important;
    }
    
    .unified-table-header,
    .unified-table-cell {
        padding: 10px 8px !important;
        font-size: 12px !important;
    }
    
    .unified-table-header {
        font-size: 13px !important;
        letter-spacing: 0.5px !important;
    }
    
    .unified-table-wrapper {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    .license-code-box {
        padding: 8px !important;
        margin: 3px 0 !important;
        font-size: 11px !important;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .license-code-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .license-code-content strong {
        font-size: 11px !important;
        margin-right: 0 !important;
    }
    
    .license-code-content span {
        font-size: 11px !important;
        word-break: break-all !important;
    }
    
    .copy-button {
        font-size: 12px !important;
        margin-left: 0 !important;
        align-self: flex-end;
    }
    
    .download-btn, .view-order-btn {
        padding: 12px 20px !important;
        font-size: 13px !important;
        text-align: center !important;
        display: block !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .expiration-info {
        font-size: 12px !important;
        padding: 4px 8px !important;
    }
    
    .copy-instructions {
        padding: 10px !important;
        margin-top: 10px !important;
    }
    
    .copy-instructions h4 {
        font-size: 12px !important;
    }
    
    .copy-instructions ul {
        font-size: 11px !important;
        padding-left: 16px !important;
    }
}

@media only screen and (max-width: 480px) {
    .unified-gaming-container {
        padding: 10px !important;
        margin: 5px 0 !important;
    }
    
    .unified-gaming-title {
        font-size: 14px !important;
    }
    
    .unified-table-header,
    .unified-table-cell {
        padding: 8px 5px !important;
        font-size: 11px !important;
    }
    
    .unified-table-header {
        font-size: 12px !important;
    }
    
    .license-code-box {
        padding: 6px !important;
        font-size: 10px !important;
    }
    
    .license-code-content strong,
    .license-code-content span {
        font-size: 10px !important;
    }
    
    .download-btn, .view-order-btn {
        padding: 10px 15px !important;
        font-size: 12px !important;
    }
    
    .copy-button {
        font-size: 10px !important;
    }
}

/* ==========================================================================
   Dark Mode Enhancements
   ========================================================================== */

@media (prefers-color-scheme: dark) {
    .unified-gaming-container {
        background-color: #1a221a;
        border-color: #0a520a;
    }
    
    .unified-license-table {
        background-color: #0f140f !important;
    }
    
    .unified-table-row {
        background-color: rgba(15, 20, 15, 0.9) !important;
    }
    
    .license-code-box {
        background: linear-gradient(135deg, #0f140f 0%, #1a221a 100%);
    }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    .unified-gaming-container {
        background: white !important;
        border: 1px solid #333 !important;
        color: #000 !important;
        box-shadow: none !important;
    }
    
    .unified-gaming-title,
    .unified-table-header,
    .license-code-content strong {
        color: #000 !important;
        text-shadow: none !important;
    }
    
    .license-code-content span {
        color: #333 !important;
    }
    
    .copy-button,
    .download-btn,
    .view-order-btn,
    .copy-instructions {
        display: none !important;
    }
    
    .license-code-box {
        border: 1px solid #ccc !important;
        background: #f9f9f9 !important;
    }
}

/* ==========================================================================
   Accessibility Enhancements
   ========================================================================== */

.unified-gaming-container:focus-within {
    outline: 2px solid #00ff00;
    outline-offset: 2px;
}

.copy-button:focus {
    outline: 2px solid #00ff00;
    outline-offset: 2px;
    opacity: 1;
}

.download-btn:focus,
.view-order-btn:focus {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .unified-gaming-container {
        border-width: 2px;
    }
    
    .license-code-box {
        border-width: 2px;
    }
    
    .unified-gaming-title,
    .unified-table-header,
    .license-code-content strong {
        text-shadow: none;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .license-code-box::before {
        display: none;
    }
}