/* ============================================
   APRS CUSTOM CSS - SVXLink Dashboard
   Autor: SP2ONG
   Data: 2024-12-11
   Plik: 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 satellite {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(-10deg);
    }
    75% {
        transform: rotate(10deg);
    }
}

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

/* === Header === */
.aprs-header {
    text-align: center;
    margin-bottom: 30px;
}

.aprs-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;
}

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

.aprs-title .material-icons {
    font-size: 36px;
    color: #ffc107;
    animation: satellite 3s ease-in-out infinite;
}


/* === Status  === */
.status-aprs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 25px;
    margin-bottom: 25px;
    border-radius: 12px;
    font-family: 'Oswald', sans-serif;
    font-size: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    animation: slideDown 0.4s ease-out;
}

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

.status-active {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.15) 0%, rgba(56, 142, 60, 0.15) 100%);
    border: 2px solid #4caf50;
    color: #4caf50;
}

.status-active .material-icons {
    color: #4caf50;
    animation: pulse 2s ease-in-out infinite;
}

.status-inactive {
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.15) 0%, rgba(255, 193, 7, 0.15) 100%);
    border: 2px solid #ff9800;
    color: #ffb74d;
}

.status-inactive .material-icons {
    color: #ff9800;
}




/* ===== CONSOLE OUTPUT ===== */
.aprs-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: 250px;
    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 ===== */
.aprs-section {
    background: white;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    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;

    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    border: 2px solid rgba(0, 174, 232, 0.3);
    border-radius: 12px;
    margin-bottom: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
    animation: slideUp 0.5s ease-out;

}

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

.section-header {
    background: linear-gradient(135deg, #00aee8 0%, #0088bb 100%);
    color: white;
    padding: 15px 20px;
    font-family: 'Roboto', sans-serif;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    letter-spacing: 0.5px;

}

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

.section-content {
    padding: 30px;
    background: rgba(0, 0, 0, 0.3);

}


/* === Form Elements === */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Roboto', sans-serif;
    font-weight: 600;
    font-size: 13px;
    color: #f3ead3;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.input-select {
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    font-family: 'Roboto', sans-serif;
    background: #dfc061;
}

.input-text {
    width: 100%;
    padding: 12px 15px;
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    font-weight: 500;
    border: 2px solid rgba(0, 174, 232, 0.3);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.5);
    color: #ffffff;
    transition: all 0.3s ease;
    outline: none;
    box-sizing: border-box;
}

.input-text:focus {
    border-color: #00aee8;
    background: rgba(0, 0, 0, 0.7);
    box-shadow: 0 0 0 3px rgba(0, 174, 232, 0.2);
}

.input-text:hover {
    border-color: #08dc6e;
}

.input-hint {
    color: #aaa;
    font-family: 'Roboto', sans-serif;
    font-size: 11px;
    line-height: 1.4;
}

.input-hint a {
    color: #00aee8;
    text-decoration: none;
}

.input-hint a:hover {
    color: #08dc6e;
    text-decoration: underline;
}



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

/* ===== CHECKBOX ===== */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: normal;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    margin-top: 8px;
}

.field-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* ===== ICON PREVIEW ===== */
.icon-preview {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    padding: 15px;
    background: rgba(0, 174, 232, 0.11);
    border-radius: 8px;
    flex-wrap: wrap;
}

.icon-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.icon-item img {
    width: 32px;
    height: 32px;
    transition: transform 0.3s ease;
}

.icon-item:hover img {
    transform: scale(1.2);
}

.icon-item span {
    font-size: 12px;
    color: white;
}

/* ===== BUTTONS ===== */
.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    margin-bottom: 30px;
    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-save {
    background: linear-gradient(135deg, #00aee8 0%, #0088bb 100%);
}

.btn-save:hover {
    background: linear-gradient(135deg, #0088bb 0%, #006688 100%);
}

.btn-activate {
    background: linear-gradient(135deg, #28a745 0%, #218838 100%);
}

.btn-activate:hover {
    background: linear-gradient(135deg, #218838 0%, #1e7e34 100%);
}

.btn-deactivate {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
}

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

/* ===== 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 code,
.warning-box code,
.tip-box code {
    background: rgba(0, 0, 0, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
}

/* ===== BUTTON LINK ===== */
.btn-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 15px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    margin-top: 8px;
    transition: all 0.3s ease;
}

.btn-link:hover {
    background: rgba(0, 0, 0, 0.2);
    transform: translateX(5px);
}

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

/* ===== 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) {
    .aprs-container {
        padding: 0 15px;
    }

    .aprs-header {
        padding: 20px;
    }

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

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

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

    .section-content {
        padding: 20px;
    }

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

    .btn {
        width: 100%;
        justify-content: center;
    }

    .icon-preview {
        justify-content: center;
    }

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

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

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

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

    .section-content {
        padding: 15px;
    }

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

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

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

    .input-text,
    .input-select {
        font-size: 14px;
    }
}

/* ===== SCROLLBAR STYLING (dla console) ===== */
.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;
}

/* ===== PRINT STYLES ===== */
@media print {
    .aprs-header,
    .form-actions,
    .btn {
        display: none;
    }

    .aprs-section {
        page-break-inside: avoid;
    }
}
/* Dodatkowe style dla sekcji GPS */
.section-content-gps {
    padding: 30px;
    background: #bfbebb;

.info-section-gps {
    margin-top: 30px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.gps-info-box {
    display: flex;
    gap: 20px;
    padding: 20px;
    background: #b2ecff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.gps-info-icon {
    flex-shrink: 0;
}

.gps-info-content {
    flex: 1;
}

.gps-info-content h3 {
    font-size: 18px;
    font-weight: 600;
}

.gps-info-content p {
    line-height: 1.6;
    color: #333;
}

.gps-info-content ul {
    list-style-type: disc;
    color: #555;
}

.gps-info-content ul li {
    margin: 5px 0;
    line-height: 1.5;
}

.gps-info-content code {
    background: rgba(0, 0, 0, 0.1);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-weight: 600;
    font-size: 13px;
}

/* Style dla info boxes w sekcji serwerów */
.info-box ul {
    list-style-type: none;
}

.info-box ul li {
    margin: 3px 0;
    line-height: 1.4;
}

@media (max-width: 768px) {
    .gps-info-box {
        flex-direction: column;
        text-align: center;
    }
    
    .gps-info-icon {
        margin: 0 auto;
    }
}

/* Animacja spinning dla ikon */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

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




/* Style dla sekcji DS18B20 */
.checkbox-label-main {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.checkbox-label-main input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    cursor: pointer;
}

.ds18b20-field {
    transition: background-color 0.3s ease;
}

.ds18b20-field:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

.ds18b20-field:not(:disabled) {
    background-color: #ffffff;
}

#ds18b20Fields {
    animation: fadeIn 0.3s ease-in;
}

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

@media (max-width: 768px) {
    .gps-info-box {
        flex-direction: column;
        text-align: center;
    }
    
    .gps-info-icon {
        margin: 0 auto;
    }
}

/* Animacja spinning dla ikon */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

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

/* Style dla sekcji GPS Enabled */
.checkbox-label-main {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    user-select: none;
}

.checkbox-label-main input[type="checkbox"] {
    margin-right: 12px;
    cursor: pointer;
    flex-shrink: 0;
    margin-top: 2px;
}

.checkbox-label-main span {
    line-height: 1.4;
}

/* Animacja dla status boxes */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.checkbox-label-main + div > div {
    animation: slideDown 0.3s ease-out;
}