/* Основные стили Cron Generator */

.cron-generator-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: #333;
}

.cron-container {
    background: #ffffff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    margin: 20px 0;
    max-width: 1000px;
}

/* Табуляция */
.cron-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    border-bottom: 2px solid #f0f0f0;
}

.cron-tab-btn {
    background: none;
    border: none;
    padding: 12px 20px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: #666;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    margin-bottom: -2px;
}

.cron-tab-btn:hover {
    color: #dd3333;
}

.cron-tab-btn.active {
    color: #dd3333;
    border-bottom-color: #dd3333;
}

/* Контент вкладок */
.cron-tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.cron-tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cron-tab-content h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: #111;
}

/* Пресеты */
.cron-presets {
    margin-bottom: 25px;
}

.cron-presets h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #666;
    text-transform: uppercase;
}

.cron-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.cron-preset-btn {
    background: #f5f5f5;
    border: 1px solid #ddd;
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: #555;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.cron-preset-btn:hover {
    background: #dd3333;
    color: #fff;
    border-color: #dd3333;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(221, 51, 51, 0.2);
}

/* Формы */
.cron-builder-form,
.cron-expert-form {
    margin-bottom: 25px;
}

.cron-form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.cron-form-group {
    display: flex;
    flex-direction: column;
}

.cron-form-group label {
    font-weight: 600;
    color: #111;
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
}

.cron-select,
.cron-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s ease;
    background-color: #fff;
}

.cron-select:focus,
.cron-input:focus {
    outline: none;
    border-color: #dd3333;
    box-shadow: 0 0 0 3px rgba(221, 51, 51, 0.1);
}

input[type="number"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

input[type="number"]:focus {
    outline: none;
    border-color: #dd3333;
    box-shadow: 0 0 0 3px rgba(221, 51, 51, 0.1);
}

input[type="text"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

input[type="text"]:focus {
    outline: none;
    border-color: #dd3333;
    box-shadow: 0 0 0 3px rgba(221, 51, 51, 0.1);
}

/* Чекбоксы дней недели */
.cron-weekday-checkboxes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
    gap: 8px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    cursor: pointer;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.checkbox-item:hover {
    background: #f9f9f9;
    border-color: #dd3333;
}

.checkbox-item.full-width {
    grid-column: 1 / -1;
}

.checkbox-item input[type="checkbox"] {
    cursor: pointer;
    width: 16px;
    height: 16px;
    accent-color: #dd3333;
}

/* Синтаксис помощь */
.cron-syntax-help {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 6px;
    margin-top: 20px;
}

.cron-syntax-help h4 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 14px;
}

.syntax-table {
    width: 100%;
    font-size: 13px;
    border-collapse: collapse;
}

.syntax-table th,
.syntax-table td {
    padding: 8px;
    border: 1px solid #ddd;
    text-align: left;
}

.syntax-table th {
    background: #f0f0f0;
    font-weight: 600;
    color: #111;
}

.syntax-table td {
    background: #fff;
}

/* Ошибки */
.cron-errors {
    background: #fee;
    border: 1px solid #f99;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 20px;
    color: #c33;
    font-size: 14px;
}

.cron-errors strong {
    display: block;
    margin-bottom: 5px;
}

/* Результаты */
.cron-result-section {
    margin-top: 30px;
}

.cron-human-readable,
.cron-preview,
.cron-expression-box,
.cron-integration {
    margin-bottom: 25px;
}

.cron-human-readable h4,
.cron-preview h4,
.cron-expression-box h4,
.cron-integration h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #111;
}

#human-readable-text {
    padding: 12px;
    background: #f0f8ff;
    border-left: 4px solid #dd3333;
    border-radius: 4px;
}

/* Список запусков */
.next-runs-list {
    max-height: 300px;
    overflow-y: auto;
}

.next-runs-list p {
    padding: 8px 0;
    margin: 0;
    font-size: 13px;
    font-family: 'Courier New', monospace;
    color: #333;
    background: #f9f9f9;
    padding: 8px;
    margin-bottom: 4px;
    border-radius: 4px;
}

.next-runs-list p:nth-child(odd) {
    background: #fff;
}

/* Cron выражение */
.cron-expression-box,
.cron-command-box {
    background: #f0f0f0;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #ddd;
}

.cron-expression-display,
.command-display {
    background: #fff;
    padding: 12px;
    border-radius: 4px;
    border: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.cron-code {
    font-family: 'Courier New', 'Courier', monospace;
    font-size: 14px;
    background: transparent;
    padding: 0;
    color: #c7254e;
    word-break: break-all;
    flex: 1;
}

/* Кнопки */
.cron-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 25px;
}

.cron-btn {
    padding: 12px 25px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.cron-btn-primary {
    background: #dd3333;
    color: #fff;
}

.cron-btn-primary:hover {
    background: #b62a2a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(221, 51, 51, 0.3);
}

.cron-btn-secondary {
    background: #0073aa;
    color: #fff;
}

.cron-btn-secondary:hover {
    background: #005a87;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 115, 170, 0.3);
}

.cron-btn-outline {
    background: #fff;
    border: 2px solid #dd3333;
    color: #dd3333;
}

.cron-btn-outline:hover {
    background: #dd3333;
    color: #fff;
}

/* Уведомление о копировании */
.copy-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #4caf50;
    color: #fff;
    padding: 15px 25px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    animation: slideIn 0.3s ease, slideOut 0.3s ease 2.7s;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

/* Отметка ошибки поля */
input.error-field,
select.error-field {
    border-color: #f99 !important;
    background-color: #fff9f9 !important;
}

/* Адаптивность */
@media (max-width: 768px) {
    .cron-container {
        padding: 15px;
    }

    .cron-form-row {
        grid-template-columns: 1fr;
    }

    .cron-tabs {
        gap: 5px;
    }

    .cron-tab-btn {
        padding: 10px 15px;
        font-size: 14px;
    }

    .cron-presets {
        flex-direction: column;
    }

    .cron-preset-btn {
        width: 100%;
    }

    .cron-actions {
        flex-direction: column;
    }

    .cron-btn {
        width: 100%;
        justify-content: center;
    }

    .cron-weekday-checkboxes {
        grid-template-columns: repeat(auto-fit, minmax(50px, 1fr));
    }
}

@media (max-width: 480px) {
    .cron-container {
        padding: 12px;
        margin: 10px 0;
    }

    .cron-syntax-help {
        overflow-x: auto;
    }

    .syntax-table {
        font-size: 11px;
    }

    .syntax-table th,
    .syntax-table td {
        padding: 5px;
    }

    .copy-notification {
        bottom: 10px;
        right: 10px;
        padding: 12px 15px;
        font-size: 13px;
    }
}
