﻿/* Responsive Design Styles */
.form-card {
    margin-top: 20px;
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    overflow: hidden;
}

.card-header {
    background: linear-gradient(135deg, #222e3c 0%, #2c3e50 100%);
    color: white;
    padding: 1rem 1.5rem;
    border-bottom: 2px solid #1a2530;
}

.form-title {
    font-weight: 600;
    font-size: 1.25rem;
}

.form-fields-container {
    background-color: #f8f9fa;
    border-radius: 6px;
    padding: 1.5rem;
    margin: 0;
}

.form-field-row {
    background-color: white;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 1rem;
    transition: all 0.2s ease;
}

    .form-field-row:hover {
        border-color: #c6d3e6;
        box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    }

.form-field-label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.95rem;
    margin-bottom: 0;
    display: flex;
    align-items: center;
}

.form-select, .form-control, .date-input {
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 0.875rem;
    transition: border-color 0.15s ease-in-out;
}

    .form-select:focus, .form-control:focus, .date-input:focus {
        border-color: #86b7fe;
        box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.1);
        outline: 0;
    }

.input-group-sm {
    border-radius: 4px;
}

.input-group-text {
    background-color: #f8f9fa;
    border: 1px solid #ced4da;
    color: #6c757d;
    font-size: 0.875rem;
}

.btn-action {
    background-color: transparent;
    color: white;
    border: 1px solid rgba(255,255,255,0.2);
    padding: 0.375rem 0.75rem;
    margin-left: 0.5rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

    .btn-action:hover {
        background-color: rgba(255,255,255,0.1);
        border-color: rgba(255,255,255,0.3);
        transform: translateY(-1px);
    }

.btn-outline-action {
    background-color: white;
    color: #6c757d;
    border: 1px solid #dee2e6;
    padding: 0.25rem 0.5rem;
    margin-left: 0.25rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

    .btn-outline-action:hover {
        background-color: #f8f9fa;
        border-color: #adb5bd;
        transform: translateY(-1px);
    }

.field-actions {
    display: flex;
    gap: 0.25rem;
}

.form-check-input {
    width: 1.1em;
    height: 1.1em;
    cursor: pointer;
}

.form-check-label {
    font-size: 0.875rem;
    color: #6c757d;
    cursor: pointer;
}

.action-link {
    color: #0d6efd;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    transition: color 0.2s ease;
}

    .action-link:hover {
        color: #0a58ca;
        text-decoration: underline;
    }

.version-info {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

.btn-success {
    background-color: #198754;
    border-color: #198754;
    padding: 0.375rem 1.5rem;
}

    .btn-success:hover {
        background-color: #157347;
        border-color: #146c43;
    }

.btn-outline-secondary {
    padding: 0.375rem 1.5rem;
}

/* Mobile Responsive */
@media (max-width: 767.98px) {
    .form-card {
        margin-top: 10px;
    }

    .card-header {
        padding: 0.75rem 1rem;
    }

    .form-title {
        font-size: 1.1rem;
    }

    .form-fields-container {
        padding: 1rem;
    }

    .form-field-row {
        padding: 0.75rem;
        margin-bottom: 0.75rem;
    }

    .form-field-label {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }

    .col-12.col-md-4 {
        margin-bottom: 0.5rem;
    }

    .field-actions {
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .btn-action, .btn-outline-action {
        margin-left: 0.25rem;
        margin-bottom: 0.25rem;
    }

    .action-buttons {
        display: flex;
        flex-wrap: wrap;
        gap: 0.25rem;
    }

    .btn-group-sm {
        flex-wrap: wrap;
    }

    .version-info {
        margin-bottom: 0.5rem;
    }

    .d-flex.justify-content-end.align-items-center {
        flex-direction: column;
        align-items: flex-end;
    }

    .form-check.me-3 {
        margin-right: 1rem !important;
        margin-bottom: 0.5rem;
    }
}

@media (max-width: 575.98px) {
    .p-3.p-md-4 {
        padding: 1rem !important;
    }

    .form-title {
        font-size: 1rem;
    }

    .btn-action {
        padding: 0.25rem 0.5rem;
        font-size: 0.875rem;
    }

    .form-field-label i {
        font-size: 0.9rem;
    }

    .form-select, .form-control, .date-input {
        font-size: 0.85rem;
    }

    .btn-sm {
        padding: 0.25rem 0.75rem;
        font-size: 0.875rem;
    }
}

/* Tablet Responsive */
@media (min-width: 768px) and (max-width: 991.98px) {
    .form-card {
        margin-top: 15px;
    }

    .form-fields-container {
        padding: 1.25rem;
    }

    .form-field-label {
        font-size: 0.9rem;
    }

    .btn-action {
        padding: 0.25rem 0.5rem;
    }

    .field-actions {
        gap: 0.5rem;
    }
}

/* Dark mode adjustments */
@media (prefers-color-scheme: dark) {
    .form-card {
        background-color: #2c3e50;
        border-color: #34495e;
    }

    .form-fields-container {
        background-color: #34495e;
    }

    .form-field-row {
        background-color: #3b4f63;
        border-color: #4a6278;
    }

    .form-field-label {
        color: #ecf0f1;
    }

    .form-select, .form-control, .date-input {
        background-color: #2c3e50;
        border-color: #4a6278;
        color: #ecf0f1;
    }

    .input-group-text {
        background-color: #34495e;
        border-color: #4a6278;
        color: #bdc3c7;
    }

    .btn-outline-action {
        background-color: #34495e;
        color: #ecf0f1;
        border-color: #4a6278;
    }

        .btn-outline-action:hover {
            background-color: #3b4f63;
            border-color: #5d6d7e;
        }
}
