/**
 * AZTEC Decoder - WordPress Plugin Styles
 * 
 * @package AztecDecoder
 * @version 1.0.0
 */

/* Resetowanie podstawowych stylów */
.aztec-decoder-container * {
    box-sizing: border-box;
}

/* Główny kontener */
.aztec-decoder-container {
    max-width: 800px;
    margin: 20px auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
}

.aztec-decoder-wrapper {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border: 1px solid #e1e5e9;
}

/* Header */
.aztec-decoder-header {
    background: linear-gradient(135deg, #2196F3, #1976D2);
    color: white;
    padding: 30px;
    text-align: center;
}

.aztec-decoder-title {
    margin: 0 0 10px 0;
    font-size: 2rem;
    font-weight: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.aztec-decoder-icon {
    font-size: 2.5rem;
}

.aztec-decoder-description {
    margin: 0;
    opacity: 0.9;
    font-size: 1.1rem;
}

/* Główna zawartość */
.aztec-decoder-main {
    padding: 30px;
}

/* Sekcja skanera */
.aztec-decoder-scanner {
    text-align: center;
    margin-bottom: 30px;
}

#aztec-video {
    width: 100%;
    max-width: 500px;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    margin: 20px 0;
}

#aztec-canvas {
    display: none;
}

/* Przyciski */
.aztec-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    margin: 5px;
    line-height: 1.5;
}

.aztec-btn-primary {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.aztec-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(76, 175, 80, 0.4);
}

.aztec-btn-secondary {
    background: linear-gradient(135deg, #f44336, #d32f2f);
    color: white;
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.3);
}

.aztec-btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(244, 67, 54, 0.4);
}

.aztec-btn-success {
    background: linear-gradient(135deg, #28a745, #218838);
    color: white;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.aztec-btn-info {
    background: linear-gradient(135deg, #17a2b8, #138496);
    color: white;
    box-shadow: 0 4px 12px rgba(23, 162, 184, 0.3);
}

.aztec-btn-outline {
    background: transparent;
    color: #2196F3;
    border: 2px solid #2196F3;
}

.aztec-btn-outline:hover {
    background: #2196F3;
    color: white;
}

.aztec-btn-link {
    background: none;
    color: #2196F3;
    border: none;
    text-decoration: underline;
    padding: 5px 10px;
    font-size: 0.9rem;
}

.aztec-btn-link:hover {
    color: #1976D2;
}

.aztec-btn-icon {
    font-size: 1.2em;
}

/* Status */
.aztec-status {
    text-align: center;
    margin: 20px 0;
    padding: 15px;
    border-radius: 8px;
    font-weight: 500;
}

.aztec-status-scanning {
    background: #e3f2fd;
    color: #1976d2;
    border: 2px solid #2196f3;
}

.aztec-status-success {
    background: #e8f5e8;
    color: #2e7d32;
    border: 2px solid #4caf50;
}

.aztec-status-error {
    background: #ffebee;
    color: #c62828;
    border: 2px solid #f44336;
}

.aztec-status-info {
    background: #e1f5fe;
    color: #0277bd;
    border: 2px solid #03a9f4;
}

.aztec-status-warning {
    background: #fff3e0;
    color: #ef6c00;
    border: 2px solid #ff9800;
}

/* Kompatybilność wsteczna */
.aztec-status.scanning {
    background: #e3f2fd;
    color: #1976d2;
    border: 2px solid #2196f3;
}

.aztec-status.success {
    background: #e8f5e8;
    color: #2e7d32;
    border: 2px solid #4caf50;
}

.aztec-status.error {
    background: #ffebee;
    color: #c62828;
    border: 2px solid #f44336;
}

/* Wyniki */
.aztec-results {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
    margin-top: 30px;
}

.aztec-results-title {
    color: #2196F3;
    font-size: 1.5rem;
    margin: 0 0 20px 0;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.aztec-results-icon {
    font-size: 1.8rem;
}

/* Siatka danych */
.aztec-data-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.aztec-data-item {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    border-left: 4px solid #2196F3;
}

.aztec-data-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.aztec-data-label {
    font-weight: 600;
    color: #555;
    margin-bottom: 8px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.aztec-data-value {
    color: #333;
    font-size: 1.1rem;
    word-break: break-word;
    font-weight: 500;
}

/* Surowe dane */
.aztec-raw-data-container {
    margin-top: 20px;
    text-align: center;
}

.aztec-raw-data {
    background: #263238;
    color: #b0bec5;
    padding: 20px;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    white-space: pre-wrap;
    word-break: break-all;
    margin: 15px 0;
    overflow-x: auto;
    border: 1px solid #37474f;
}

/* Akcje */
.aztec-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

/* Motyw ciemny */
.aztec-decoder-dark .aztec-decoder-wrapper {
    background: #2c2c2c;
    border-color: #444;
}

.aztec-decoder-dark .aztec-decoder-header {
    background: linear-gradient(135deg, #1a237e, #0d47a1);
}

.aztec-decoder-dark .aztec-results {
    background: #3c3c3c;
}

.aztec-decoder-dark .aztec-data-item {
    background: #404040;
    color: #e0e0e0;
}

.aztec-decoder-dark .aztec-data-label {
    color: #bbb;
}

.aztec-decoder-dark .aztec-data-value {
    color: #fff;
}

/* Responsywność */
@media (max-width: 768px) {
    .aztec-decoder-container {
        margin: 10px;
    }
    
    .aztec-decoder-header {
        padding: 20px;
    }
    
    .aztec-decoder-title {
        font-size: 1.5rem;
    }
    
    .aztec-decoder-main {
        padding: 20px;
    }
    
    .aztec-data-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .aztec-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .aztec-btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .aztec-decoder-header {
        padding: 15px;
    }
    
    .aztec-decoder-title {
        font-size: 1.3rem;
        flex-direction: column;
        gap: 5px;
    }
    
    .aztec-decoder-main {
        padding: 15px;
    }
    
    .aztec-data-item {
        padding: 15px;
    }
}

/* Animacje */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.aztec-results {
    animation: fadeIn 0.5s ease-out;
}

.aztec-data-item {
    animation: fadeIn 0.3s ease-out;
}

/* Dostępność */
.aztec-btn:focus,
.aztec-btn-link:focus {
    outline: 2px solid #2196F3;
    outline-offset: 2px;
}

/* Wskaźniki ładowania */
.aztec-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-radius: 50%;
    border-top: 2px solid #2196F3;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}