/* Styles pour le plugin Reviews with Attachments */

/* Styles pour l'admin WooCommerce */
.review-attachment-admin {
    margin-top: 10px;
    padding: 10px;
    background: #f0f0f1;
    border: 1px solid #c3c4c7;
    border-radius: 3px;
}

.review-attachment-admin h4 {
    margin: 0 0 8px 0;
    font-size: 12px;
    color: #1d2327;
    font-weight: 600;
}

.review-attachment-admin .attachment-image img {
    max-width: 80px;
    max-height: 80px;
    border: 1px solid #ddd;
    border-radius: 2px;
}

.review-attachment-admin .attachment-file {
    display: inline-block;
}

.review-attachment-admin .attachment-link {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    background: #0073aa;
    color: white;
    text-decoration: none;
    border-radius: 2px;
    font-size: 11px;
}

.review-attachment-admin .attachment-link:hover {
    background: #005a87;
    color: white;
    text-decoration: none;
}

.review-attachment-admin .attachment-icon {
    margin-right: 4px;
    font-size: 12px;
}

/* Styles pour les statuts d'approbation */
.attachment-status {
    margin-bottom: 5px;
}

.status-indicator {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
}

.status-indicator.pending {
    background: #f0ad4e;
    color: white;
}

.status-indicator.approved {
    background: #5cb85c;
    color: white;
}

.approve-attachment {
    margin-top: 3px;
    font-size: 10px;
    padding: 2px 6px;
    height: auto;
    line-height: 1.2;
}

/* Styles pour la page d'approbation */
.photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.photo-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.photo-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.photo-card img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 5px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}

.photo-card img:hover {
    transform: scale(1.05);
}

.approve-single {
    background: #5cb85c !important;
    border-color: #4cae4c !important;
    color: white !important;
}

.approve-single:hover {
    background: #449d44 !important;
    border-color: #398439 !important;
}

/* Compteur de notifications */
.awaiting-mod {
    background: #d63638;
    color: white;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: bold;
    margin-left: 5px;
}

/* Formulaire d'avis avec pièce jointe */
.comment-form-attachment {
    margin: 10px 0;
    padding: 8px;
    background: #f8f9fa;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 4px;
    font-size: 13px;
}

.comment-form-attachment label {
    font-weight: normal;
    color: #6c757d;
    margin-bottom: 5px;
}

.comment-form-attachment input[type="file"] {
    margin-top: 5px;
    font-size: 12px;
    width: 100%;
    padding: 4px;
    border: 1px solid #ced4da;
    border-radius: 3px;
    background: white;
}

.comment-form-attachment small {
    display: block;
    margin-top: 3px;
    color: #6c757d;
    font-size: 11px;
}

/* Affichage des pièces jointes dans les avis */
.review-attachment {
    margin-top: 10px;
    padding: 0;
    background: transparent;
    border: none;
}

.attachment-image {
    text-align: left;
}

.attachment-image img {
    max-width: 80px;
    max-height: 80px;
    border: 1px solid #ddd;
    border-radius: 3px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}

.attachment-image img:hover {
    transform: scale(1.05);
}

.attachment-file {
    display: inline-block;
}

.attachment-link {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    background: #f8f9fa;
    color: #495057;
    text-decoration: none;
    border-radius: 3px;
    border: 1px solid #dee2e6;
    transition: background-color 0.2s ease;
    font-size: 13px;
}

.attachment-link:hover {
    background: #e9ecef;
    color: #495057;
    text-decoration: none;
}

.attachment-icon {
    margin-right: 5px;
    font-size: 14px;
}

/* Messages d'erreur et de succès */
.attachment-error {
    color: #d63638;
    font-size: 12px;
    margin-top: 5px;
}

.attachment-success {
    color: #00a32a;
    font-size: 12px;
    margin-top: 5px;
}

/* Indicateur de chargement */
.attachment-loading {
    display: none;
    color: #666;
    font-size: 12px;
    margin-top: 5px;
}

.attachment-loading:before {
    content: "⏳ ";
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive design */
@media (max-width: 768px) {
    .attachment-image img {
        max-width: 150px;
        max-height: 150px;
    }
    
    .comment-form-attachment {
        padding: 10px;
    }
}

/* Styles pour l'interface d'administration */
.wc-reviews-attachments-admin {
    margin-top: 20px;
}

.wc-reviews-attachments-admin table {
    width: 100%;
    border-collapse: collapse;
}

.wc-reviews-attachments-admin th,
.wc-reviews-attachments-admin td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.wc-reviews-attachments-admin th {
    background: #f1f1f1;
    font-weight: bold;
}

.wc-reviews-attachments-admin tr:hover {
    background: #f9f9f9;
}

/* Styles pour les notifications */
.notice.wc-reviews-attachments-notice {
    border-left-color: #0073aa;
}

.notice.wc-reviews-attachments-notice.notice-success {
    border-left-color: #00a32a;
}

.notice.wc-reviews-attachments-notice.notice-error {
    border-left-color: #d63638;
}


