/* CSS pour le plugin BV Voyage Form Manager */

.bv-form-container {
    max-width: 1000px;
    margin: 40px auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: #333;
}

/* Header */
.bv-form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #eaeaea;
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.bv-form-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.bv-header-actions {
    display: flex;
    gap: 12px;
}

/* Form Card */
.bv-form-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    border: 1px solid #f1f5f9;
    padding: 35px;
    margin-bottom: 30px;
}

.bv-form-card h2 {
    font-size: 22px;
    font-weight: 600;
    color: #0f172a;
    margin-top: 0;
    margin-bottom: 25px;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 15px;
}

/* Form Grid */
.form-row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -10px;
    margin-left: -10px;
    margin-bottom: 20px;
}

.form-group {
    padding-right: 10px;
    padding-left: 10px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.col-4 { width: 33.333%; }
.col-6 { width: 50%; }
.col-12 { width: 100%; }

@media (max-width: 768px) {
    .col-4, .col-6, .col-12 {
        width: 100% !important;
        margin-bottom: 15px;
    }
}

/* Labels and Inputs */
.form-group label {
    font-size: 14px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 8px;
}

.form-group label .required {
    color: #ef4444;
    margin-left: 3px;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group input[type="time"],
.form-group select,
.form-group textarea {
    padding: 12px 16px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 15px;
    background-color: #f8fafc;
    color: #1e293b;
    transition: all 0.3s ease;
    outline: none;
    box-sizing: border-box;
    width: 100%;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #3b82f6;
    background-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.field-hint {
    font-size: 12px;
    color: #64748b;
    margin-top: 5px;
    line-height: 1.4;
}

/* Custom Checkbox Design */
.checkbox-group {
    margin-top: 10px;
    padding: 15px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px dashed #cbd5e1;
}

.bv-checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 600 !important;
    color: #1e293b !important;
    font-size: 15px !important;
    user-select: none;
    position: relative;
}

.bv-checkbox-label input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkbox-custom {
    height: 22px;
    width: 22px;
    background-color: #ffffff;
    border: 2px solid #cbd5e1;
    border-radius: 6px;
    margin-right: 12px;
    display: inline-block;
    position: relative;
    transition: all 0.2s ease;
}

/* When the checkbox is checked, add a background color */
.bv-checkbox-label input:checked ~ .checkbox-custom {
    background-color: #3b82f6;
    border-color: #3b82f6;
}

/* Create the checkmark/indicator (hidden when not checked) */
.checkbox-custom:after {
    content: "";
    position: absolute;
    display: none;
}

/* Show the checkmark when checked */
.bv-checkbox-label input:checked ~ .checkbox-custom:after {
    display: block;
}

/* Style the checkmark */
.bv-checkbox-label .checkbox-custom:after {
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Image Preview */
.image-preview-wrapper {
    margin-top: 15px;
    padding: 10px;
    background: #f1f5f9;
    border-radius: 8px;
    display: inline-block;
}

.image-preview-wrapper p {
    margin: 0 0 8px 0;
    font-size: 12px;
    font-weight: bold;
    color: #64748b;
}

.form-image-preview {
    max-height: 120px;
    border-radius: 6px;
    display: block;
    object-fit: cover;
}

/* Buttons styling */
.bv-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid transparent;
}

.bv-btn-primary {
    background-color: #3b82f6;
    color: #ffffff;
}

.bv-btn-primary:hover {
    background-color: #2563eb;
}

.bv-btn-active {
    background-color: #0f172a;
    color: #ffffff;
}

.bv-btn-submit {
    background-color: #10b981;
    color: #ffffff;
    font-size: 16px;
    padding: 12px 30px;
}

.bv-btn-submit:hover {
    background-color: #059669;
}

.bv-btn-cancel {
    padding: 12px 20px;
    font-size: 16px;
    color: #64748b;
    text-decoration: none;
    margin-left: 15px;
    transition: color 0.2s ease;
}

.bv-btn-cancel:hover {
    color: #0f172a;
}

.bv-header-actions .bv-btn {
    background-color: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
}

.bv-header-actions .bv-btn:hover {
    background-color: #e2e8f0;
    color: #0f172a;
}

.bv-header-actions .bv-btn.bv-btn-active {
    background-color: #3b82f6;
    color: #ffffff;
    border-color: #3b82f6;
}

/* Alerts */
.bv-alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    font-size: 15px;
    font-weight: 500;
}

.bv-alert-success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.bv-alert-error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* Filter Bar */
.bv-filter-bar-form {
    margin-bottom: 25px;
    background: #f8fafc;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.filter-controls-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.filter-input-search {
    flex: 1;
    min-width: 200px;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
}

.filter-select {
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 14px;
    background-color: white;
    outline: none;
    min-width: 160px;
}

.bv-btn-reset-filters {
    font-size: 14px;
    color: #ef4444;
    text-decoration: none;
    margin-left: 5px;
    font-weight: 600;
}

.bv-btn-reset-filters:hover {
    text-decoration: underline;
}

/* Delete Button */
.bv-btn-delete {
    display: inline-flex;
    padding: 6px 12px;
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    margin-left: 8px;
    transition: all 0.2s ease;
}

.bv-btn-delete:hover {
    background-color: #ef4444;
    color: #ffffff;
    border-color: #ef4444;
}

/* Table styling */
.bv-table-wrapper {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    overflow-x: auto;
}

.bv-voyages-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.bv-voyages-table th {
    background-color: #f8fafc;
    padding: 16px 20px;
    font-weight: 600;
    font-size: 13px;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid #e2e8f0;
}

.bv-voyages-table td {
    padding: 16px 20px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 14px;
    vertical-align: middle;
}

.bv-voyages-table tr:last-child td {
    border-bottom: none;
}

.bv-voyages-table tr:hover td {
    background-color: #f8fafc;
}

.bv-trip-thumb {
    width: 60px;
    height: 45px;
    object-fit: cover;
    border-radius: 6px;
    display: block;
}

.no-image {
    font-size: 11px;
    color: #94a3b8;
    background: #f1f5f9;
    padding: 6px 10px;
    border-radius: 4px;
}

.col-image {
    width: 80px;
}

.col-nom {
    min-width: 250px;
}

.text-muted {
    color: #64748b;
}

/* Badges */
.bv-badge {
    display: inline-block;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 9999px;
    text-align: center;
}

.badge-new {
    background-color: #dbeafe;
    color: #1e40af;
}

.badge-old {
    background-color: #f1f5f9;
    color: #475569;
}

.bv-btn-edit {
    display: inline-flex;
    padding: 6px 12px;
    background-color: #f1f5f9;
    color: #1e293b;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.bv-btn-edit:hover {
    background-color: #3b82f6;
    color: #ffffff;
    border-color: #3b82f6;
}

/* Login Wrapper */
.login-required {
    max-width: 500px !important;
}

#bv-loginform {
    margin-top: 20px;
}

#bv-loginform p {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
}

#bv-loginform p label {
    font-size: 14px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 5px;
}

#bv-loginform input[type="text"],
#bv-loginform input[type="password"] {
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 15px;
    outline: none;
}

#bv-loginform input[type="submit"] {
    background-color: #3b82f6;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
    margin-top: 10px;
}

#bv-loginform input[type="submit"]:hover {
    background-color: #2563eb;
}

.badge-complete-needed {
    background-color: #fef3c7;
    color: #d97706;
}

.readonly-field {
    background-color: #e2e8f0 !important;
    color: #94a3b8 !important;
    border-color: #cbd5e1 !important;
    pointer-events: none;
    cursor: not-allowed;
}

