/**
 * Redsys Shortcodes Styles
 * 
 * Specific styles for shortcode pages
 * 
 * @package Payment_Gateway_Redsys
 * @since 1.0.0
 */

/* Shortcode Container Base */
.redsys-shortcode-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* Payment Display Shortcode */
.redsys-payment-display {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.redsys-payment-display .payment-header {
    background: linear-gradient(135deg, #0073aa 0%, #005a87 100%);
    color: white;
    padding: 30px 20px;
    text-align: center;
}

.redsys-payment-display .payment-header h2 {
    margin: 0 0 10px 0;
    font-size: 1.8em;
    font-weight: 300;
}

.redsys-payment-display .payment-header p {
    margin: 0;
    opacity: 0.9;
    font-size: 1.1em;
}

.redsys-payment-display .payment-body {
    padding: 30px 20px;
}

/* Payment Summary Enhancement */
.redsys-payment-summary {
    border: none;
    background: #f8f9fa;
    margin-bottom: 30px;
}

.redsys-payment-summary .summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.summary-item {
    padding: 15px;
    background: white;
    border-radius: 6px;
    border-left: 4px solid #0073aa;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.summary-item .item-label {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.summary-item .item-value {
    font-size: 1.2em;
    font-weight: 600;
    color: #333;
}

.summary-item.amount .item-value {
    color: #0073aa;
    font-size: 1.4em;
}

/* Success Page Enhancements */
.redsys-success-page {
    text-align: center;
}

.redsys-success-page .success-animation {
    margin-bottom: 30px;
}

.success-checkmark {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #28a745;
    position: relative;
    margin: 0 auto 20px;
    animation: redsys-success-pop 0.6s ease-in-out;
}

.success-checkmark::after {
    content: "✓";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 36px;
    font-weight: bold;
}

@keyframes redsys-success-pop {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.success-message {
    font-size: 1.3em;
    color: #28a745;
    margin-bottom: 30px;
    font-weight: 500;
}

/* Error Page Enhancements */
.redsys-error-page {
    text-align: center;
}

.error-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #dc3545;
    position: relative;
    margin: 0 auto 20px;
}

.error-icon::after {
    content: "✗";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 36px;
    font-weight: bold;
}

.error-message {
    font-size: 1.2em;
    color: #dc3545;
    margin-bottom: 20px;
    font-weight: 500;
}

.error-details {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
    padding: 20px;
    margin: 20px 0;
    text-align: left;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.error-code {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    color: #721c24;
}

/* Transaction Timeline */
.transaction-timeline {
    position: relative;
    padding: 20px 0;
    margin: 30px 0;
}

.timeline-item {
    position: relative;
    padding: 15px 0 15px 40px;
    border-left: 2px solid #e9ecef;
}

.timeline-item::before {
    content: "";
    position: absolute;
    left: -6px;
    top: 20px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #0073aa;
}

.timeline-item.completed::before {
    background: #28a745;
}

.timeline-item.failed::before {
    background: #dc3545;
}

.timeline-item:last-child {
    border-left: none;
}

.timeline-content h4 {
    margin: 0 0 5px 0;
    font-size: 1.1em;
    color: #333;
}

.timeline-content p {
    margin: 0;
    color: #666;
    font-size: 0.9em;
}

.timeline-time {
    font-size: 0.8em;
    color: #999;
    margin-top: 5px;
}

/* Progress Indicator */
.payment-progress {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 30px 0;
    position: relative;
}

.progress-step {
    flex: 1;
    text-align: center;
    position: relative;
}

.progress-step::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: #e9ecef;
    z-index: 1;
}

.progress-step.completed::before {
    background: #28a745;
}

.progress-step:first-child::before {
    left: 50%;
}

.progress-step:last-child::before {
    right: 50%;
}

.step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e9ecef;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    position: relative;
    z-index: 2;
    font-weight: bold;
}

.progress-step.completed .step-circle {
    background: #28a745;
    color: white;
}

.progress-step.active .step-circle {
    background: #0073aa;
    color: white;
}

.step-label {
    font-size: 0.9em;
    color: #666;
}

.progress-step.completed .step-label,
.progress-step.active .step-label {
    color: #333;
    font-weight: 500;
}

/* Security Badge */
.security-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #e8f5e8;
    color: #2c5f41;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9em;
    margin-top: 15px;
}

.security-badge::before {
    content: "🔒";
    font-size: 16px;
}

/* Auto-submit countdown */
.auto-submit-countdown {
    text-align: center;
    margin-top: 20px;
    padding: 15px;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    color: #856404;
}

.countdown-timer {
    font-weight: bold;
    color: #0073aa;
    font-size: 1.2em;
}

/* Form validation styles */
.field-error {
    border: 2px solid #dc3545 !important;
    background-color: #fff5f5 !important;
}

.field-error-message {
    color: #dc3545;
    font-size: 0.9em;
    margin-top: 5px;
    display: block;
}

.field-success {
    border: 2px solid #28a745 !important;
    background-color: #f8fff8 !important;
}

/* Responsive adjustments for shortcodes */
@media (max-width: 768px) {
    .redsys-shortcode-container {
        margin: 10px;
        padding: 10px;
    }
    
    .redsys-payment-display .payment-header {
        padding: 20px 15px;
    }
    
    .redsys-payment-display .payment-body {
        padding: 20px 15px;
    }
    
    .summary-grid {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
    
    .payment-progress {
        flex-direction: column;
        gap: 20px;
    }
    
    .progress-step::before {
        display: none;
    }
    
    .timeline-item {
        padding-left: 30px;
    }
}

@media (max-width: 480px) {
    .success-checkmark,
    .error-icon {
        width: 60px;
        height: 60px;
    }
    
    .success-checkmark::after,
    .error-icon::after {
        font-size: 24px;
    }
    
    .step-circle {
        width: 30px;
        height: 30px;
        font-size: 0.9em;
    }
}