/* Video Marketplace v2 - Frontend Styles */

/* ==========================================================================
   Variables
   ========================================================================== */
:root {
    --vme-primary: #0073aa;
    --vme-primary-dark: #005177;
    --vme-success: #28a745;
    --vme-danger: #dc3545;
    --vme-warning: #ffc107;
    --vme-info: #17a2b8;
    --vme-light: #f8f9fa;
    --vme-dark: #343a40;
    --vme-border: #dee2e6;
    --vme-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* ==========================================================================
   Video Player
   ========================================================================== */
.vme-video-player {
    margin-bottom: 30px;
}

.vme-video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    background: #000;
    border-radius: 8px;
}

.vme-video-wrapper iframe,
.vme-video-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ==========================================================================
   Purchase Required Box
   ========================================================================== */
.vme-purchase-required {
    margin: 30px 0;
}

.vme-purchase-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--vme-shadow);
}

.vme-purchase-icon {
    font-size: 60px;
    margin-bottom: 20px;
}

.vme-purchase-box h3 {
    font-size: 28px;
    margin: 0 0 20px;
    color: white;
}

.vme-prices {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 30px 0;
}

.vme-price {
    background: rgba(255, 255, 255, 0.2);
    padding: 15px 30px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.vme-price .currency {
    display: block;
    font-size: 14px;
    opacity: 0.9;
}

.vme-price .amount {
    display: block;
    font-size: 32px;
    font-weight: bold;
}

.vme-help-text {
    margin-top: 15px;
    opacity: 0.9;
}

.vme-help-text a {
    color: white;
    text-decoration: underline;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.vme-btn {
    display: inline-block;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.vme-btn-primary {
    background: var(--vme-success);
    color: white;
}

.vme-btn-primary:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
    color: white;
}

.vme-btn-secondary {
    background: var(--vme-light);
    color: var(--vme-dark);
}

.vme-btn-secondary:hover {
    background: #e2e6ea;
    color: var(--vme-dark);
}

/* ==========================================================================
   Checkout Page
   ========================================================================== */
.vme-checkout-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.vme-checkout-header {
    text-align: center;
    margin-bottom: 30px;
}

.vme-checkout-header h2 {
    font-size: 32px;
    margin: 0;
}

.vme-checkout-video-info {
    display: flex;
    gap: 20px;
    background: var(--vme-light);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.vme-checkout-video-info img {
    width: 200px;
    height: auto;
    border-radius: 6px;
}

.vme-video-details h3 {
    margin: 0 0 10px;
    font-size: 24px;
}

.vme-video-author {
    color: #666;
    margin: 0;
}

.vme-payment-section {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--vme-shadow);
    margin-bottom: 30px;
}

.vme-payment-section h3 {
    margin-top: 0;
    font-size: 16px;
}

.vme-currency-options {
    display: flex;
    gap: 20px;
    margin: 20px 0;
}

.vme-currency-option {
    flex: 1;
    cursor: pointer;
}

.vme-currency-option input[type="radio"] {
    display: none;
}

.vme-currency-box {
    border: 2px solid var(--vme-border);
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    transition: all 0.3s ease;
}

.vme-currency-option input[type="radio"]:checked + .vme-currency-box {
    border-color: var(--vme-primary);
    background: #e7f3ff;
}

.vme-currency-box .currency-symbol {
    display: block;
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

.vme-currency-box .currency-amount {
    display: block;
    font-size: 28px;
    font-weight: bold;
}

.vme-payment-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.vme-payment-method {
    background: white;
    border: 2px solid var(--vme-border);
    padding: 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.vme-payment-method:not([disabled]):hover {
    border-color: var(--vme-primary);
    box-shadow: var(--vme-shadow);
    transform: translateY(-2px);
}

.vme-payment-method[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

.vme-payment-method .payment-logo {
    margin-bottom: 10px;
}

.vme-payment-method .payment-label {
    font-size: 12px;
    color: #666;
}

.vme-mp-button {
    background: linear-gradient(135deg, #009EE3 0%, #0071AD 100%);
    border-color: #009EE3;
    color: white;
}

.vme-mp-button:not([disabled]):hover {
    background: linear-gradient(135deg, #0071AD 0%, #005A8C 100%);
    border-color: #0071AD;
    box-shadow: 0 4px 12px rgba(0, 158, 227, 0.3);
}

.vme-mp-button .payment-logo svg text {
    fill: white;
}

.vme-mp-button .payment-label {
    color: white;
    font-weight: 600;
}

.vme-checkout-summary {
    background: var(--vme-light);
    padding: 20px;
    border-radius: 8px;
}

.vme-summary-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--vme-border);
}

.vme-summary-item.total {
    font-size: 16px;
    font-weight: bold;
    border-bottom: none;
    margin-top: 10px;
}

/* ==========================================================================
   Success/Failed Pages
   ========================================================================== */
.vme-success-container,
.vme-failed-container {
    max-width: 600px;
    margin: 50px auto;
    padding: 40px;
    text-align: center;
    background: white;
    border-radius: 12px;
    box-shadow: var(--vme-shadow);
}

.vme-success-icon,
.vme-failed-icon {
    font-size: 80px;
    margin-bottom: 20px;
}

.vme-success-container h2 {
    color: var(--vme-success);
}

.vme-failed-container h2 {
    color: var(--vme-danger);
}

.vme-success-actions,
.vme-failed-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

.vme-failed-reasons {
    text-align: left;
    background: var(--vme-light);
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.vme-failed-reasons h4 {
    margin-top: 0;
}

.vme-failed-reasons ul {
    margin: 10px 0 0 20px;
}

/* ==========================================================================
   My Videos Grid
   ========================================================================== */
.vme-my-videos-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.vme-my-videos-container h2 {
    font-size: 32px;
    margin-bottom: 30px;
}

.vme-no-videos {
    text-align: center;
    padding: 60px 20px;
    background: var(--vme-light);
    border-radius: 12px;
}

.vme-empty-icon {
    font-size: 80px;
    margin-bottom: 20px;
}

.vme-videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.vme-video-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--vme-shadow);
    transition: transform 0.3s ease;
}

.vme-video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.vme-video-thumbnail {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    background: #000;
}

.vme-video-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vme-no-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
}

.vme-duration {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.vme-video-info {
    padding: 20px;
}

.vme-video-info h3 {
    margin: 0 0 10px;
    font-size: 18px;
}

.vme-video-author,
.vme-purchase-date,
.vme-purchase-price {
    font-size: 14px;
    color: #666;
    margin: 5px 0;
}

.vme-purchase-price {
    font-weight: bold;
    color: var(--vme-success);
}

.vme-video-actions {
    padding: 0 20px 20px;
}

.vme-video-actions .vme-btn {
    width: 100%;
}

/* ==========================================================================
   Info/Notice Boxes
   ========================================================================== */
.vme-info-box {
    background: #e7f3ff;
    border-left: 4px solid var(--vme-info);
    padding: 20px;
    border-radius: 4px;
    margin: 20px 0;
}

.vme-info-box h4 {
    margin-top: 0;
    color: var(--vme-info);
}

.vme-notice {
    padding: 15px 20px;
    border-radius: 6px;
    margin: 20px 0;
}

.vme-notice.success {
    background: #d4edda;
    border-left: 4px solid var(--vme-success);
    color: #155724;
}

.vme-notice.error {
    background: #f8d7da;
    border-left: 4px solid var(--vme-danger);
    color: #721c24;
}

.vme-notice a {
    color: inherit;
    text-decoration: underline;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 768px) {
    .vme-purchase-box {
        padding: 30px 20px;
    }
    
    .vme-prices {
        flex-direction: column;
    }
    
    .vme-checkout-video-info {
        flex-direction: column;
    }
    
    .vme-checkout-video-info img {
        width: 100%;
    }
    
    .vme-currency-options {
        flex-direction: column;
    }
    
    .vme-success-actions,
    .vme-failed-actions {
        flex-direction: column;
    }
    
    .vme-videos-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   v6.1.0 - UX Mejorada Videos Individuales
   ========================================================================== */

/* Layout general */
.vme-video-single-layout {
    position: relative;
}

/* MÓVIL por defecto */

/* Video preview MÓVIL - aparece PRIMERO */
.vme-video-preview-mobile {
    display: block;
    margin-bottom: 20px;
}

/* Miniatura ESCRITORIO - oculta en móvil */
.vme-thumbnail-desktop {
    display: none;
}

/* Descripción - siempre visible (desktop y móvil) v6.9.0 */
.vme-description-desktop {
    display: block;
}

/* Mensaje MÓVIL - visible por defecto */
.vme-message-mobile {
    display: block;
    font-size: 16px;
    line-height: 1.4;
}

/* Mensaje ESCRITORIO - oculto en móvil */
.vme-message-desktop {
    display: none;
}

/* ESCRITORIO (768px+) */
@media (min-width: 768px) {
    /* Ocultar video preview en escritorio */
    .vme-video-preview-mobile {
        display: none;
    }
    
    /* Mostrar miniatura en escritorio */
    .vme-thumbnail-desktop {
        display: block;
    }
    
    /* Mostrar descripción en escritorio (debajo del título) */
    .vme-description-desktop {
        display: block;
        margin-bottom: 30px;
        padding: 25px;
        background: #f8f9fa;
        border-radius: 8px;
        line-height: 1.8;
        font-size: 16px;
    }
    
    /* Cambiar mensajes */
    .vme-message-mobile {
        display: none;
    }
    
    .vme-message-desktop {
        display: block;
        font-size: 28px;
    }
}

/* Ajustes responsive purchase box */
@media (max-width: 767px) {
    .vme-purchase-box {
        padding: 25px 20px;
    }
    
    .vme-prices {
        flex-direction: column;
        gap: 15px;
    }
    
    .vme-price {
        padding: 12px 20px;
    }
}

/* ==========================================================================
   v6.1.0 - UX Mejorada Videos Individuales (VIDEO PREVIEW)
   ========================================================================== */

/* Layout general */
.vme-video-single-layout {
    position: relative;
}

/* MÓVIL por defecto */

/* Video preview MÓVIL - aparece PRIMERO */
.vme-video-preview-mobile {
    display: block;
    margin-bottom: 20px;
}

/* Video preview ESCRITORIO - oculto en móvil */
.vme-video-preview-desktop {
    display: none;
}

/* Descripción - siempre visible (desktop y móvil) v6.9.0 */
.vme-description-desktop {
    display: block;
}

/* Mensaje MÓVIL - visible por defecto */
.vme-message-mobile {
    display: block;
    font-size: 16px;
    line-height: 1.4;
}

/* Mensaje ESCRITORIO - oculto en móvil */
.vme-message-desktop {
    display: none;
}

/* ESCRITORIO (768px+) */
@media (min-width: 768px) {
    /* Ocultar video preview móvil en escritorio */
    .vme-video-preview-mobile {
        display: none;
    }
    
    /* Mostrar video preview en escritorio */
    .vme-video-preview-desktop {
        display: block;
    }
    
    /* Mostrar descripción en escritorio (debajo del título) */
    .vme-description-desktop {
        display: block;
        margin-bottom: 30px;
        padding: 25px;
        background: #f8f9fa;
        border-radius: 8px;
        line-height: 1.8;
        font-size: 16px;
    }
    
    /* Cambiar mensajes */
    .vme-message-mobile {
        display: none;
    }
    
    .vme-message-desktop {
        display: block;
        font-size: 28px;
    }
}

/* Ajustes responsive purchase box */
@media (max-width: 767px) {
    .vme-purchase-box {
        padding: 25px 20px;
    }
    
    .vme-prices {
        flex-direction: column;
        gap: 15px;
    }
    
    .vme-price {
        padding: 12px 20px;
    }
}
