/* ============================================
   COORCONV CUSTOM CSS - SVXLink Dashboard
   Autor: SP2ONG
   Data: 2024-12-11
   Plik: coorconv-custom.css
   Spójny styl z aprs-custom.css
   ============================================ */

/* ===== 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.1); }
}

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

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

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

/* ===== HEADER ===== */
.coorconv-header {
    background: linear-gradient(135deg, #1d2658 0%, #3f4c84 100%);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.6s ease-out;

}

.coorconv-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    color: #00aee8;
    font-family: 'Oswald', sans-serif;
    font-size: 28px;
    font-weight: 600;
    margin: 0 0 10px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.coorconv-title .material-icons {
    font-size: 36px;
    animation: pulse 2s ease-in-out infinite;
}

.coorconv-subtitle {
    margin: 0;
    font-size: 16px;
    opacity: 0.9;
    font-weight: 400;
}

/* ===== STATUS ===== */
.coorconv-status {
    padding: 20px 25px;
    border-radius: 8px;
    margin-bottom: 25px;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideUp 0.6s ease-out;
}

.coorconv-status .material-icons {
    font-size: 28px;
}

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

.status-waiting .material-icons {
    color: #2196f3;
}

.status-ready {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border-left: 5px solid #28a745;
    color: #155724;
}

.status-ready .material-icons {
    color: #28a745;
}

/* ===== CONSOLE OUTPUT ===== */
.coorconv-console {
    background: #1a1a1a;
    border-radius: 8px;
    margin-bottom: 25px;
    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.8;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* ===== SECTIONS ===== */
.coorconv-section {
    background: white;
    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;
}

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

.section-header {
    background: linear-gradient(135deg, #9c27b0 0%, #7b1fa2 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;
}

/* ===== RESULT SECTION (green highlight) ===== */
.result-section .section-header {
    background: linear-gradient(135deg, #28a745 0%, #218838 100%);
}

/* ===== FORM ELEMENTS ===== */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
}

.form-group label .material-icons {
    font-size: 20px;
    color: #9c27b0;
}

.input-textarea {
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Courier New', monospace;
    transition: all 0.3s ease;
    resize: vertical;
    min-height: 80px;
}

.input-textarea:focus {
    outline: none;
    border-color: #9c27b0;
    box-shadow: 0 0 0 3px rgba(156, 39, 176, 0.1);
}

.input-textarea:hover {
    border-color: #9c27b0;
}

.input-textarea.input-error {
    border-color: #f44336;
    background: #ffebee;
}

.input-hint {
    font-size: 13px;
    color: #666;
    display: flex;
    align-items: center;
    gap: 5px;
    font-style: italic;
}

.input-hint .material-icons {
    font-size: 16px;
}

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

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

/* ===== BUTTONS ===== */
.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
    flex-wrap: wrap;
}

.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-convert {
    background: linear-gradient(135deg, #9c27b0 0%, #7b1fa2 100%);
}

.btn-convert:hover {
    background: linear-gradient(135deg, #7b1fa2 0%, #6a1b9a 100%);
}

.btn-clear {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
}

.btn-clear:hover {
    background: linear-gradient(135deg, #f57c00 0%, #e65100 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;
}

/* ===== RESULT GRID ===== */
.result-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 25px;
}

.result-box {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    transition: all 0.3s ease;
}

.result-box:hover {
    border-color: #9c27b0;
    box-shadow: 0 4px 12px rgba(156, 39, 176, 0.1);
}

.result-box.highlight {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border-color: #4caf50;
}

.result-box.highlight:hover {
    border-color: #388e3c;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.2);
}

.result-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #555;
    margin-bottom: 10px;
    font-size: 14px;
}

.result-label .material-icons {
    font-size: 18px;
    color: #9c27b0;
}

.result-box.highlight .result-label .material-icons {
    color: #4caf50;
}

.result-value {
    display: flex;
    gap: 10px;
    align-items: center;
}

.result-input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 15px;
    font-weight: 600;
    background: white;
    color: #333;
}

.result-input.highlight {
    background: #fff;
    border-color: #4caf50;
    color: #2e7d32;
}

.btn-copy {
    padding: 10px;
    background: linear-gradient(135deg, #9c27b0 0%, #7b1fa2 100%);
    border: none;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-copy:hover {
    background: linear-gradient(135deg, #7b1fa2 0%, #6a1b9a 100%);
    transform: scale(1.1);
}

.btn-copy.copied {
    background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
}

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

/* ===== QUICK COPY ===== */
.quick-copy {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    border: 2px solid #ff9800;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.quick-copy-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #e65100;
    margin-bottom: 12px;
    font-size: 15px;
}

.quick-copy-label .material-icons {
    font-size: 22px;
}

.quick-copy-value {
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn-copy-large {
    padding: 10px 20px;
    gap: 8px;
    white-space: nowrap;
}

/* ===== ACTION LINK ===== */
.action-link {
    text-align: center;
    margin-top: 20px;
}

.btn-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 25px;
    background: linear-gradient(135deg, #00aee8 0%, #0088bb 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 174, 232, 0.3);
}

.btn-link:hover {
    background: linear-gradient(135deg, #0088bb 0%, #006688 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 174, 232, 0.4);
}

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

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

.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: #e65100;
}

.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;
    margin-top: 2px;
}

.info-box a,
.warning-box a,
.tip-box a {
    color: inherit;
    font-weight: 600;
    text-decoration: underline;
}

.info-box a:hover,
.warning-box a:hover,
.tip-box a:hover {
    text-decoration: none;
}

.info-box ol,
.info-box ul,
.warning-box ul,
.tip-box ul {
    margin: 10px 0 0 0;
    padding-left: 25px;
}

.info-box li,
.warning-box li,
.tip-box li {
    margin-bottom: 8px;
}

/* ===== TOAST NOTIFICATION ===== */
.toast-notification {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
    color: white;
    padding: 15px 30px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    font-weight: 600;
    z-index: 9999;
    transition: bottom 0.3s ease;
}

.toast-notification.show {
    bottom: 30px;
}

/* ===== 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;
}

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

    .coorconv-header {
        padding: 20px;
    }

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

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

    .section-content {
        padding: 20px;
    }

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

    .form-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .quick-copy-value {
        flex-direction: column;
    }

    .btn-copy-large {
        width: 100%;
    }

    .console-output {
        max-height: 200px;
    }
}

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

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

    .section-header {
        font-size: 16px;
        padding: 15px 20px;
    }

    .section-content {
        padding: 15px;
    }

    .coorconv-status {
        flex-direction: column;
        text-align: center;
        font-size: 14px;
    }

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

    .result-value {
        flex-direction: column;
    }

    .btn-copy {
        width: 100%;
    }
}

/* ===== SCROLLBAR STYLING ===== */
.console-output::-webkit-scrollbar {
    width: 8px;
}

.console-output::-webkit-scrollbar-track {
    background: #2c3e50;
}

.console-output::-webkit-scrollbar-thumb {
    background: #00ff88;
    border-radius: 4px;
}

.console-output::-webkit-scrollbar-thumb:hover {
    background: #00dd77;
}
