/* ================================================
   WebConf Dashboard Configuration Stylesheet
   Author: SP2ONG
   Style: Modern, Responsive, Animated
   ================================================ */

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

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

.webconf-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(0, 174, 232, 0.1) 0%, rgba(8, 220, 110, 0.1) 100%);
    border-radius: 12px;
    border: 2px solid rgba(0, 174, 232, 0.3);
    transition: all 0.3s ease;
}

.webconf-title:hover {
    border-color: #00aee8;
    box-shadow: 0 4px 15px rgba(0, 174, 232, 0.3);
    transform: translateY(-2px);
}

.webconf-title .material-icons {
    font-size: 32px;
    color: #08dc6e;
    animation: rotate 4s linear infinite;
}

/* === Config File Info === */
.config-file-info {
    background: linear-gradient(135deg, rgba(8, 220, 110, 0.15) 0%, rgba(0, 174, 232, 0.15) 100%);
    border: 2px solid #08dc6e;
    border-radius: 8px;
    padding: 12px 20px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Roboto', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #08dc6e;
}

.config-file-info .material-icons {
    font-size: 20px;
}

/* === Console Output === */
.webconf-console {
    background: #1a1a1a;
    border: 2px solid #00aee8;
    border-radius: 12px;
    margin-bottom: 25px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 174, 232, 0.2);
    animation: slideDown 0.4s ease-out;
}

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

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

.console-output {
    background: #000;
    padding: 15px 20px;
    min-height: 80px;
    max-height: 150px;
    overflow-y: auto;
}

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

.console-output::-webkit-scrollbar {
    width: 8px;
}

.console-output::-webkit-scrollbar-track {
    background: #1a1a1a;
}

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

.console-output::-webkit-scrollbar-thumb:hover {
    background: #08dc6e;
}

/* === Form Sections === */
.webconf-section {
    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;
}

.webconf-section:hover {
    border-color: #00aee8;
    box-shadow: 0 6px 20px rgba(0, 174, 232, 0.25);
}

.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: 25px;
    background: rgba(0, 0, 0, 0.3);
}

/* === Form Elements === */
.form-group {
    margin-bottom: 20px;
}

.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;
    margin-bottom: 8px;
}

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

.input-text,
.input-select {
    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,
.input-select: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,
.input-select:hover {
    border-color: #08dc6e;
}

.input-select {
    cursor: pointer;
    color: #ff8c00;
    font-weight: 700;
}

.input-select option {
    background: #1a1a1a;
    color: #ffffff;
}

.input-short {
    max-width: 150px;
}

/* === Info & Warning Boxes === */
.info-box,
.warning-box {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.info-box {
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.15) 0%, rgba(3, 169, 244, 0.15) 100%);
    border: 2px solid #2196f3;
}

.info-box .material-icons {
    font-size: 28px;
    color: #2196f3;
    flex-shrink: 0;
}

.info-box p,
.warning-box p {
    color: #f3ead3;
    font-family: 'Roboto', sans-serif;
    font-size: 13px;
    margin: 0;
    line-height: 1.6;
}

.warning-box {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.15) 0%, rgba(255, 152, 0, 0.15) 100%);
    border: 2px solid #ffc107;
}

.warning-box .material-icons {
    font-size: 28px;
    color: #ffc107;
    flex-shrink: 0;
}

.info-link {
    color: #00aee8;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.info-link:hover {
    color: #08dc6e;
    text-decoration: underline;
}

/* === DTMF Keys === */
.dtmf-info {
    background: linear-gradient(135deg, rgba(156, 39, 176, 0.15) 0%, rgba(123, 31, 162, 0.15) 100%);
    border: 2px solid #9c27b0;
}

.dtmf-info .material-icons {
    color: #9c27b0;
}

.dtmf-info strong {
    color: #00ffff;
    font-weight: 700;
}

.dtmf-key-group {
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(8, 220, 110, 0.3);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.dtmf-key-group:hover {
    border-color: #08dc6e;
    box-shadow: 0 4px 12px rgba(8, 220, 110, 0.2);
}

.key-header {
    font-family: 'Oswald', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: #08dc6e;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.key-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr 150px;
    gap: 15px;
    align-items: end;
}

.key-inputs .form-group {
    margin-bottom: 0;
}

.key-inputs label {
    font-size: 11px;
    margin-bottom: 4px;
    text-transform: none;
    color: #aaa;
}

.input-dtmf {
    text-transform: uppercase;
}

.input-color {
    font-size: 13px;
}

.toggle-group {
    background: rgba(8, 220, 110, 0.1);
    border: 2px solid #08dc6e;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 25px;
}

.toggle-group label {
    color: #08dc6e;
    font-size: 14px;
}

/* === Buttons === */
.form-actions {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.btn {
    padding: 16px 40px;
    font-family: 'Roboto', sans-serif;
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

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

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

.btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.btn-save {
    background: linear-gradient(135deg, #ff4444 0%, #cc0000 100%);
    color: white;
}

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

/* ✅ Blokuj ponowne kliknięcia przez CSS, nie disabled */
.btn-saving {
    pointer-events: none !important;
    cursor: wait !important;
    opacity: 0.8 !important;
    background: linear-gradient(135deg, #ff9800 0%, #e68900 100%) !important;
}

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

/* === Access Denied === */
.access-denied {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.access-denied img {
    max-width: 300px;
    opacity: 0.8;
    animation: float 3s ease-in-out infinite;
}

.access-denied-text {
    color: #f3ead3;
    font-size: 18px;
    font-family: 'Roboto', sans-serif;
    font-weight: 600;
    margin-top: 30px;
}

/* === Animations === */
@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 rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

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

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

/* === Responsive Design === */
@media screen and (max-width: 768px) {
    .webconf-container {
        padding: 10px;
    }
    
    .webconf-title {
        font-size: 18px;
        flex-direction: column;
        gap: 8px;
    }
    
    .webconf-title .material-icons {
        font-size: 28px;
    }
    
    .section-header {
        font-size: 12px;
        padding: 12px 15px;
    }
    
    .section-content {
        padding: 15px;
    }
    
    .key-inputs {
        grid-template-columns: 1fr;
    }
    
    .console-output pre {
        font-size: 11px;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
}

@media screen and (max-width: 480px) {
    .webconf-title {
        font-size: 16px;
    }
    
    .form-group label {
        font-size: 11px;
    }
    
    .input-text,
    .input-select {
        font-size: 13px;
        padding: 10px 12px;
    }
    
    .btn {
        font-size: 13px;
        padding: 14px 30px;
    }
    
    .config-file-info {
        font-size: 11px;
        flex-direction: column;
        text-align: center;
    }
    
    .info-box,
    .warning-box {
        flex-direction: column;
        text-align: center;
    }
}