/**

 * Soft Livreur Frontend Styles

 */



.soft-livreur-form p {

    margin-bottom: 15px;

}

.soft-livreur-form label {

    display: block;

    margin-bottom: 5px;

    font-weight: bold;

}

.soft-livreur-form input[type="text"],

.soft-livreur-form input[type="email"],

.soft-livreur-form input[type="password"],

.soft-livreur-form input[type="date"],

.soft-livreur-form input[type="file"],

.soft-livreur-form select,

.soft-livreur-form textarea {

    width: 100%;

    padding: 8px;

    border: 1px solid #ddd;

    box-sizing: border-box; /* Important */

}

.soft-livreur-form .required {

    color: red;

}



.soft-livreur-message {

    padding: 15px;

    margin-bottom: 20px;

    border: 1px solid transparent;

    border-radius: 4px;

}

.soft-livreur-message.error {

    color: #a94442;

    background-color: #f2dede;

    border-color: #ebccd1;

}

.soft-livreur-message.success {

    color: #3c763d;

    background-color: #dff0d8;

    border-color: #d6e9c6;

}

.soft-livreur-message.info {

    color: #31708f;

    background-color: #d9edf7;

    border-color: #bce8f1;

}

 .soft-livreur-message.warning {

    color: #8a6d3b;

    background-color: #fcf8e3;

    border-color: #faebcc;

}





/* Dashboard */

.soft-livreur-dashboard .dashboard-section {

    background-color: #f9f9f9;

    padding: 20px;

    margin-bottom: 20px;

    border: 1px solid #e0e0e0;

    border-radius: 5px;

}

.soft-livreur-dashboard h2, .soft-livreur-dashboard h3 {

    margin-top: 0;

}

#sl-current-availability-status { font-weight: bold; }

.sl-orders-list { list-style: none; padding: 0; }

.sl-order-item {

    border: 1px solid #ccc;

    padding: 15px;

    margin-bottom: 10px;

    background-color: #fff;

    border-radius: 3px;

}

.sl-order-item h4 { margin-top: 0; }



/* Livreurs Disponibles Cards */

.soft-livreurs-disponibles-list {

    display: grid;

    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));

    gap: 20px;

}

.soft-livreur-card {

    border: 1px solid #ddd;

    border-radius: 5px;

    padding: 15px;

    background-color: #fff;

    display: flex;

    flex-direction: column;

    align-items: center;

    text-align: center;

}

.soft-livreur-card .livreur-photo img {

    width: 100px;

    height: 100px;

    border-radius: 50%;

    object-fit: cover;

    margin-bottom: 10px;

}

.soft-livreur-card .livreur-info h3 {

    margin: 10px 0 5px;

    font-size: 1.2em;

}

.soft-livreur-card .livreur-info p {

    font-size: 0.9em;

    color: #555;

    margin: 5px 0;

}



/* Admin Pricing Table */

.soft-livreur-settings .small-text { width: 80px; text-align: right; }

.soft-livreur-pricing-table th, .soft-livreur-pricing-table td { text-align: center; }

.soft-livreur-pricing-table th.manage-column:first-child,

.soft-livreur-pricing-table tr th[scope="row"] { text-align: left; }

/* NOUVEAU : Styles pour les boutons d'action sur la carte de commande */
.sl-order-item .order-actions .button,
.sl-order-item .order-actions .sl-action-btn {
    margin-right: 8px;
    margin-bottom: 8px;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.9em;
    display: inline-block;
    border: none;
    cursor: pointer;
}

.sl-action-btn.sl-call-btn {
    background-color: #3498db; /* Bleu */
    color: white;
}
.sl-action-btn.sl-call-btn:hover {
    background-color: #2980b9;
}

.sl-action-btn.sl-whatsapp-btn {
    background-color: #25D366; /* Vert WhatsApp */
    color: white;
}
.sl-action-btn.sl-whatsapp-btn:hover {
    background-color: #1DA851;
}


/* NOUVEAU : Style pour l'interrupteur de disponibilité */
.availability-section .sl-availability-toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
    background-color: #f7f7f7;
    border: 1px solid #e0e0e0;
    padding: 15px;
    border-radius: 8px;
}

.availability-section .status-label {
    font-weight: bold;
    color: #333;
}

#sl-current-availability-status-text {
    font-weight: bold;
    font-size: 1.1em;
    min-width: 110px; /* Pour éviter le décalage quand le texte change */
}

/* Le conteneur de l'interrupteur */
.sl-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

/* On cache la case à cocher HTML par défaut */
.sl-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

/* Le fond de l'interrupteur (le "slider") */
.sl-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

/* Le cercle qui bouge */
.sl-slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

/* Style quand l'interrupteur est activé (checked) */
input:checked + .sl-slider {
    background-color: #25D366; /* Vert WhatsApp/succès */
}

/* Animation du cercle quand il est activé */
input:checked + .sl-slider:before {
    transform: translateX(26px);
}

/* Style de la section parente quand le livreur est disponible */
.availability-section[data-status="available"] {
    border-left: 5px solid #25D366;
}
/* Style quand il est indisponible */
.availability-section[data-status="unavailable"] {
    border-left: 5px solid #ccc;
}

/* NOUVEAU : Styles pour le formulaire de notation */
.sl-rating-form-wrapper {
    max-width: 600px;
    margin: 20px auto;
    padding: 25px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.sl-rating-form-wrapper h3 {
    text-align: center;
    margin-top: 0;
    margin-bottom: 20px;
}
.sl-rating-form-group {
    margin-bottom: 20px;
}
.sl-rating-form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 8px;
}
.sl-rating-form-group select,
.sl-rating-form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}
.sl-rating-form-group textarea {
    min-height: 100px;
    resize: vertical;
}
.sl-rating-form-group .description {
    font-size: 0.9em;
    color: #777;
    margin-top: 5px;
}
.sl-rating-form button {
    width: 100%;
    padding: 12px;
    font-size: 1.1em;
    cursor: pointer;
}

.criteria-rating-group {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}
.criteria-rating-group:last-of-type {
    border-bottom: none;
}
.criteria-label {
    display: block;
    margin-bottom: 10px;
}
.binary-options {
    display: flex;
    gap: 10px;
}
.binary-options input[type="radio"] {
    display: none; /* On cache le bouton radio natif */
}
.binary-options label {
    flex: 1;
    text-align: center;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}
.binary-options label.thumb-up::before {
    content: '👍';
    margin-right: 8px;
}
.binary-options label.thumb-down::before {
    content: '👎';
    margin-right: 8px;
}

/* Style pour l'option sélectionnée */
.binary-options input[type="radio"]:checked + label {
    border-width: 2px;
    font-weight: bold;
}
.binary-options input[type="radio"][value="1"]:checked + label {
    border-color: #25D366; /* Vert */
    background-color: #eafaf1;
}
.binary-options input[type="radio"][value="0"]:checked + label {
    border-color: #e74c3c; /* Rouge */
    background-color: #fbecec;
}

/* ============================================= */
/* == Styles pour les rappels de notation == */
/* ============================================= */
.sl-rating-reminders-wrapper {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 20px 0;
}

.sl-rating-reminder-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    background-color: #ffffff;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.sl-rating-reminder-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.reminder-icon {
    font-size: 24px;
    margin-right: 15px;
    flex-shrink: 0;
    line-height: 1;
}

.reminder-text {
    flex-grow: 1;
    font-weight: 500;
    color: #495057;
}

.reminder-button {
    flex-shrink: 0;
    padding: 8px 16px;
    background-image: linear-gradient(45deg, #007bff, #0056b3);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.9em;
    font-weight: bold;
    text-align: center;
    transition: all 0.2s ease;
    white-space: nowrap;
    border: none;
    cursor: pointer;
}

.reminder-button:hover {
    color: white;
    transform: scale(1.05);
    box-shadow: 0 4px 10px rgba(0, 123, 255, 0.3);
}

/* Rendre le tout plus compact sur mobile */
@media (max-width: 600px) {
    .sl-rating-reminder-card {
        flex-direction: column;
        align-items: flex-start;
        padding: 15px;
    }

    .reminder-text {
        margin: 10px 0;
        font-size: 1.1em;
    }

    .reminder-button {
        width: 100%;
        padding: 12px;
    }
}

/* ============================================= */
/* == Styles pour la Page de Suivi de Commande == */
/* ============================================= */
.sl-order-tracking-page {
    max-width: 800px;
    margin: 20px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.sl-tracking-header {
    text-align: center;
    margin-bottom: 40px;
}
.sl-tracking-header h2 {
    font-size: 2em;
    color: #2c3e50;
    margin-bottom: 5px;
}
.sl-tracking-header p {
    font-size: 1.1em;
    color: #7f8c8d;
}

/* Timeline */
.sl-timeline-wrapper {
    margin-bottom: 40px;
}
.sl-timeline {
    list-style: none;
    padding: 0;
    position: relative;
}
/* La ligne verticale de la timeline */
.sl-timeline::before {
    content: '';
    position: absolute;
    top: 10px;
    bottom: 10px;
    left: 12px;
    width: 4px;
    background-color: #ecf0f1;
    border-radius: 2px;
}
.sl-timeline li {
    padding-left: 40px;
    position: relative;
    margin-bottom: 30px;
}
.sl-timeline-marker {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: white;
    border: 4px solid #ecf0f1;
    position: absolute;
    left: 0;
    top: 0;
    transition: all 0.3s ease;
}
.sl-timeline-content h4 {
    margin: 0 0 5px;
    font-size: 1.1em;
    color: #7f8c8d;
}
.sl-timeline-content p {
    margin: 0;
    font-size: 0.9em;
    color: #95a5a6;
}

/* Statuts de la timeline */
.sl-timeline li.completed .sl-timeline-marker {
    border-color: #2ecc71; /* Vert */
    background-color: #2ecc71;
}
.sl-timeline li.completed .sl-timeline-content h4 {
    color: #2c3e50;
    font-weight: 600;
}
.sl-timeline li.active .sl-timeline-marker {
    border-color: #3498db; /* Bleu */
    transform: scale(1.1);
}
.sl-timeline li.active .sl-timeline-content h4 {
    color: #3498db;
    font-weight: 600;
}
.sl-timeline li.cancelled .sl-timeline-marker {
    border-color: #e74c3c; /* Rouge */
}
.sl-timeline li.cancelled .sl-timeline-content h4 {
    color: #e74c3c;
    text-decoration: line-through;
}

/* Grille des détails */
.sl-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    background-color: #f9f9f9;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
}
.sl-detail-item {
    display: flex;
    align-items: center;
    background: white;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #eee;
}
.sl-detail-icon {
    font-size: 1.8em;
    margin-right: 15px;
}
.sl-detail-text {
    display: flex;
    flex-direction: column;
}
.sl-detail-label {
    font-size: 0.9em;
    color: #7f8c8d;
    margin-bottom: 2px;
}
.sl-detail-value {
    font-size: 1.1em;
    font-weight: 600;
    color: #2c3e50;
}

/* Carte de contact */
.sl-contact-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}
.sl-contact-card h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #34495e;
}
.sl-contact-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

/* ============================================= */
/* == Styles pour l'affichage des évaluations  == */
/* ============================================= */
.sl-ratings-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #ecf0f1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.sl-rating-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    padding: 25px;
    display: flex;
    flex-direction: column;
}

.sl-rating-card h4 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #2c3e50;
    font-size: 1.2em;
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 15px;
}

.rating-score {
    font-size: 3em;
    font-weight: 700;
    color: #3498db;
    text-align: center;
    margin-bottom: 20px;
}
.rating-score span {
    font-size: 0.4em;
    font-weight: 500;
    color: #7f8c8d;
    margin-left: 5px;
}

.rating-criteria-list {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}
.rating-criteria-list li {
    display: flex;
    align-items: center;
    font-size: 1em;
    padding: 8px 0;
}
.rating-criteria-list li span {
    margin-left: 10px;
}
.rating-criteria-list li.positive {
    color: #27ae60;
}
.rating-criteria-list li.negative {
    color: #c0392b;
}

.rating-message {
    background: #f8f9fa;
    border-left: 4px solid #bdc3c7;
    padding: 15px;
    margin: 0;
    font-style: italic;
    color: #555;
}

/* ============================================= */
/* == Styles pour la preuve de livraison      == */
/* ============================================= */
.sl-proof-of-delivery-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #ecf0f1;
    text-align: center;
}

.sl-proof-of-delivery-section h4 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #2c3e50;
    font-size: 1.2em;
}

.sl-proof-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease-in-out;
}

.sl-proof-image a:hover img {
    transform: scale(1.02);
}