/* ============================================
   BACKUP CUSTOM CSS - SVXLink Dashboard
   Autor: SP2ONG
   Data: 2024-12-11
   ============================================ */

/* ===== ANIMACJE ===== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideDown {
    from { 
        opacity: 0; 
        transform: translateY(-30px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

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

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes spinning {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ===== CONTAINER ===== */
.backup-container {
    max-width: 900px;
    margin: 20px auto;
    padding: 0 20px;
    animation: fadeIn 0.5s ease-in;
}

/* ===== HEADER ===== */
.backup-header {
    color: white;
    margin-bottom: 30px;
    animation: slideDown 0.6s ease-out;
}

.backup-title {
    font-family: 'Oswald', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: #00aee8;
    text-shadow: 0.5px 0.5px 2px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 0;
    padding: 15px;
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.1) 0%, rgba(255, 152, 0, 0.1) 100%);
    border-radius: 12px;
    border: 2px solid rgba(255, 193, 7, 0.3);
    transition: all 0.3s ease;
}

.backup-title:hover {
    border-color: #ffc107;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
    transform: translateY(-2px);
}

.backup-title .material-icons {
    font-size: 32px;
    color: #08dc6e;
    animation: pulse 2s ease-in-out infinite;
}

/* ===== CONSOLE OUTPUT ===== */
.backup-console {
    background: #1a1a1a;
    border-radius: 8px;
    margin-bottom: 30px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.6s ease-out;
}

.console-header {
    background: linear-gradient(135deg, #2c3e50 0%, #1a252f 100%);
    color: #00ff88;
    padding: 12px 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 2px solid #00ff88;
}

.console-header .material-icons {
    font-size: 20px;
}

.console-output {
    padding: 20px;
    max-height: 300px;
    overflow-y: auto;
}

.console-output pre {
    margin: 0;
    color: #00ff88;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* ===== SECTIONS ===== */
.backup-section {
    background: #c8e6c9;
    border-radius: 12px;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    animation: slideUp 0.6s ease-out;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.section-header {
    background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
    color: white;
    padding: 18px 25px;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-header .material-icons {
    font-size: 24px;
}

.section-content {
    padding: 30px;
}

.section-description {
    color: #555;
    font-size: 15px;
    margin-bottom: 25px;
    line-height: 1.6;
}

/* ===== DOWNLOAD SECTION ===== */
.download-section .section-header {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
}

/* ===== RESTORE SECTION ===== */
.restore-section .section-header {
    background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 30px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.btn .material-icons {
    font-size: 22px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.btn:active {
    transform: translateY(0);
}

.btn-download {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    width: 100%;
}

.btn-download:hover {
    background: linear-gradient(135deg, #229954 0%, #1e8449 100%);
}

.btn-restore {
    background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
    width: 100%;
}

.btn-restore:hover {
    background: linear-gradient(135deg, #d35400 0%, #ba4a00 100%);
}

/* ✅ KRYTYCZNE: pointer-events zamiast disabled */
.btn-saving {
    pointer-events: none !important;
    cursor: wait !important;
    opacity: 0.8 !important;
}

.btn-saving .material-icons.spinning {
    animation: spinning 1s linear infinite;
}

/* ===== FILE UPLOAD ===== */
.file-upload-wrapper {
    margin-bottom: 25px;
}

.file-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 40px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 3px dashed #00aee8;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #00aee8;
    font-weight: 600;
    font-size: 16px;
}

.file-label .material-icons {
    font-size: 32px;
}

.file-label:hover {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-color: #0088bb;
    transform: translateY(-2px);
}

.file-label.drag-over {
    background: linear-gradient(135deg, #c8e6c9 0%, #a5d6a7 100%);
    border-color: #4caf50;
    color: #2e7d32;
}

.file-input {
    display: none;
}

.file-name-display {
    margin-top: 15px;
    padding: 12px 20px;
    background: #f3ead3;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    color: black;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.file-name-display .material-icons {
    font-size: 18px;
}

/* ===== ERROR MESSAGE ===== */
.error-message {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #f44336;
    font-size: 14px;
    margin-top: 10px;
    padding: 10px;
    background: #ffebee;
    border-radius: 6px;
    border-left: 4px solid #f44336;
}

.error-message .material-icons {
    font-size: 18px;
}

/* ===== SEPARATOR ===== */
.separator {
    text-align: center;
    margin: 30px 0;
    position: relative;
}

.separator::before,
.separator::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 45%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #ddd, transparent);
}

.separator::before {
    left: 0;
}

.separator::after {
    right: 0;
}

.separator span {
    background: #234581;
    padding: 0 20px;
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 14px;
    position: relative;
    z-index: 1;
}

/* ===== INFO/WARNING/TIP BOXES ===== */
.info-box,
.warning-box,
.tip-box {
    padding: 20px 25px;
    border-radius: 8px;
    margin-bottom: 25px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    animation: slideUp 0.6s ease-out;
}

.info-box {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-left: 5px solid #2196f3;
    color: #0d47a1;
}

.warning-box {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    border-left: 5px solid #ff9800;
    color: #2a5170;
}

.tip-box {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border-left: 5px solid #4caf50;
    color: #1b5e20;
}

.info-box .material-icons,
.warning-box .material-icons,
.tip-box .material-icons {
    font-size: 28px;
    flex-shrink: 0;
}

.info-box p,
.warning-box p,
.tip-box p {
    margin: 0;
    line-height: 1.6;
}

.warning-content h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 700;
}

.warning-content ul {
    margin: 0;
    padding-left: 20px;
}

.warning-content li {
    margin-bottom: 10px;
    line-height: 1.5;
}

/* ===== HELP SECTION ===== */
.help-section .section-header {
    background: linear-gradient(135deg, #9c27b0 0%, #7b1fa2 100%);
}

.help-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.help-item {
    display: flex;
    gap: 15px;
    padding: 20px;
    background: #f3ead3;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.help-item:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.help-number {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #9c27b0 0%, #7b1fa2 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    flex-shrink: 0;
}

.help-text strong {
    display: block;
    color: #333;
    margin-bottom: 8px;
    font-size: 15px;
}

.help-text p {
    margin: 0;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

/* ===== RESPONSIVE ===== */
@media screen and (max-width: 768px) {
    .backup-container {
        padding: 0 15px;
    }

    .backup-header {
        padding: 20px;
    }

    .backup-title {
        font-size: 22px;
    }

    .backup-title .material-icons {
        font-size: 28px;
    }

    .section-content {
        padding: 20px;
    }

    .help-grid {
        grid-template-columns: 1fr;
    }

    .btn {
        padding: 12px 20px;
        font-size: 15px;
    }

    .file-label {
        padding: 30px 15px;
        font-size: 15px;
    }

    .file-label .material-icons {
        font-size: 28px;
    }
}

@media screen and (max-width: 480px) {
    .backup-title {
        font-size: 18px;
        flex-direction: column;
        text-align: center;
    }

    .backup-title .material-icons {
        font-size: 32px;
    }

    .section-header {
        font-size: 16px;
        padding: 15px 20px;
        flex-direction: column;
        text-align: center;
    }

    .help-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .info-box,
    .warning-box,
    .tip-box {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .warning-content ul {
        text-align: left;
    }
}

/* ===== ACCESS DENIED ===== */
.access-denied {
    text-align: center;
    padding: 60px 20px;
    animation: fadeIn 0.5s ease-in;
}

.access-denied img {
    max-width: 200px;
    margin-bottom: 30px;
    opacity: 0.7;
}

.access-denied-text {
    color: #e74c3c;
    font-size: 20px;
    font-weight: 600;
}

.btn-success {
    ackground: linear-gradient(135deg, #4CAF50 0%, #45a049 100%) !important;
    animation: successPulse 0.5s ease;
}

.btn-error {
    background: linear-gradient(135deg, #F44336 0%, #d32f2f 100%) !important;
    animation: errorShake 0.5s ease;
}

@keyframes successPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes errorShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.spinning {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Dodatkowe style dla upgrade */
.upgrade-icon {
    color: #FF9800;
}
.section-header .material-icons.upgrade-icon {
    color: #FF9800;
}
.btn-upgrade {
    background: linear-gradient(135deg, #FF9800 0%, #F57C00 100%);
}
.btn-upgrade:hover {
    background: linear-gradient(135deg, #F57C00 0%, #E65100 100%);
}
.warning-box.upgrade-warning {
    border-left: 4px solid #FF9800;
    background: #bbdefb;
}
.warning-box.upgrade-warning .material-icons {
    color: #f44336;
}

.btn-saving {
    pointer-events: none;  /* Blokuje kliknięcia */
    opacity: 0.7;          /* Przyciemnienie */
    cursor: wait !important;
}

.material-icons.spinning {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
