/* Layout Container */
.htaccess-generator-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
    max-width: 800px;
    margin: 40px auto 0;
}

/* Panels */
.generator-panel {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    padding: 24px;
}

.generator-panel h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 18px;
    border-bottom: 2px solid #007bff;
    padding-bottom: 10px;
    color: #333;
}

/* Tabs */
.tabs {
    display: flex;
    flex-wrap: wrap;
    /* Allow wrapping on small screens */
    border-bottom: 2px solid #ddd;
    margin-bottom: 20px;
}

.tab-btn {
    flex: 1 1 auto;
    /* Grow and shrink, auto basis */
    padding: 12px 10px;
    /* slightly smaller padding to prevent wrapping on tablet */
    background: #f8f9fa;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    color: #555;
    transition: all 0.2s;
    outline: none;
    margin-bottom: -2px;
    /* overlap border */
    text-align: center;
}

.tab-btn:hover {
    background: #e9ecef;
    color: #333;
}

.tab-btn.active {
    background: #fff;
    color: #007bff;
    border-bottom-color: #007bff;
}

.tab-pane {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.tab-pane.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Forms */
.form-section {
    margin-bottom: 20px;
    background: #fdfdfd;
    padding: 15px;
    border: 1px solid #eaeaea;
    border-radius: 6px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 14px;
    color: #444;
}

.form-group .hint {
    display: block;
    font-size: 12px;
    color: #777;
    margin-bottom: 5px;
}

.generator-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.generator-input:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, .25);
}

.input-row {
    display: flex;
    gap: 15px;
    align-items: center;
}

.input-row .form-group {
    flex: 1;
}

.input-row .icon-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
    margin-top: 25px;
    /* align with inputs below labels */
}

/* Radio/Status Toggles */
.status-radios {
    display: flex;
    flex-wrap: wrap;
    /* Allow wrapping */
    gap: 15px;
    margin-top: 10px;
}

.status-label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    cursor: pointer;
    background: #f1f3f5;
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid #ddd;
    transition: background 0.2s;
}

.status-label:hover {
    background: #e9ecef;
}

.status-label input {
    margin: 0;
    accent-color: #007bff;
}


/* Code Output Area */
.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #2d2d2d;
    padding: 12px 16px;
    border-radius: 8px 8px 0 0;
}

.code-header h3 {
    margin: 0;
    color: #fff;
    font-size: 16px;
    border: none;
    padding: 0;
}

.copy-btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 6px 14px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s;
}

.copy-btn:hover {
    background: #0056b3;
}

.copy-btn.copied {
    background: #28a745;
}

.code-output {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 20px;
    border-radius: 0 0 8px 8px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
    white-space: pre-wrap;
    word-break: break-all;
    min-height: 200px;
    overflow-x: auto;
}

@media (max-width: 600px) {
    .input-row {
        flex-direction: column;
        gap: 10px;
    }

    .input-row .icon-arrow {
        transform: rotate(90deg);
        margin-top: 5px;
        margin-bottom: 5px;
    }

    .status-radios {
        flex-direction: column;
        gap: 10px;
    }
}