/* Styles pour la grille des applications (ChoralPro Dashboard) */

/* Validation Feedback Styles */
.cp-validation-feedback {
    display: block;
    margin-top: 5px;
    font-size: 0.85em;
}

.cp-validation-feedback.valid {
    color: #28a745;
}

.cp-validation-feedback.invalid {
    color: #dc3545;
}

/* Wizard Info Styling */
.cp-wizard-info {
    background: #e7f3ff;
    border: 1px solid #b3d9ff;
    border-radius: 4px;
    padding: 12px;
    margin-bottom: 20px;
    color: #0073aa;
}

.cp-wizard-info i {
    margin-right: 8px;
}

/* Wizard Skip and Finish Buttons */
.cp-wizard-skip, .cp-wizard-finish {
    background: #6c757d !important;
    border-color: #6c757d !important;
    color: white !important;
    margin-right: 10px;
}

.cp-wizard-skip:hover, .cp-wizard-finish:hover {
    background: #5a6268 !important;
    border-color: #545b62 !important;
}

/* Wizard Modal Headers */
.cp-modal-header h3 i {
    margin-right: 8px;
    color: #0073aa;
}

/* Modal Footer Button Spacing */
.cp-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 15px;
    border-top: 1px solid #ddd;
    margin-top: 20px;
}

.cp-modal-footer .button {
    margin: 0;
}

/* Piece cards styling */
.cp-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.cp-item-card {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

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

.cp-item-header {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 15px;
}

.cp-item-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: #0073aa;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
}

.cp-item-info {
    flex: 1;
    min-width: 0;
}

.cp-item-title {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
}

.cp-item-link {
    color: #0073aa;
    text-decoration: none;
}

.cp-item-link:hover {
    color: #005177;
    text-decoration: underline;
}

.cp-item-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cp-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #666;
}

.cp-meta-item i {
    width: 14px;
    font-size: 12px;
}

.cp-item-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.cp-action-btn {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    border: 1px solid #ddd;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #666;
    transition: all 0.2s ease;
}

.cp-action-btn:hover {
    background: #f8f9fa;
    color: #0073aa;
    border-color: #0073aa;
}

.cp-btn-view:hover {
    background: #e7f3ff;
}

.cp-btn-edit:hover {
    background: #fff3cd;
    color: #856404;
    border-color: #856404;
}

.cp-item-footer {
    padding-top: 15px;
    border-top: 1px solid #eee;
    margin-top: 15px;
}

.cp-item-date {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #999;
}

.cp-no-items {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.cp-no-items-icon {
    font-size: 48px;
    color: #ddd;
    margin-bottom: 20px;
}

.cp-no-items h3 {
    margin: 0 0 10px 0;
    color: #333;
}

.cp-no-items p {
    margin: 0;
    font-size: 14px;
}

/* Piece view styling */
.cp-piece-view {
    max-width: 1200px;
    margin: 0 auto;
}

.cp-view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #eee;
}

.cp-back-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #0073aa;
    text-decoration: none;
    font-weight: 500;
}

.cp-back-btn:hover {
    color: #005177;
}

.cp-edit-btn {
    background: #0073aa;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cp-edit-btn:hover {
    background: #005177;
}

.cp-view-section {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 30px;
    overflow: hidden;
}

.cp-section-header {
    background: #f8f9fa;
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cp-section-header h2,
.cp-section-header h3 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cp-edit-icon-btn {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 4px;
    border-radius: 3px;
    margin-left: 10px;
}

.cp-edit-icon-btn:hover {
    background: #e9ecef;
    color: #0073aa;
}

.cp-section-content {
    padding: 20px;
}

.cp-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.cp-info-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.cp-info-label {
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cp-info-value {
    color: #666;
    font-size: 15px;
}

.cp-info-notes {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.cp-info-notes h4 {
    margin: 0 0 10px 0;
    color: #333;
}

.cp-files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.cp-file-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 6px;
    background: #fafafa;
}

.cp-file-icon {
    width: 40px;
    height: 40px;
    background: #0073aa;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
}

.cp-file-info h4 {
    margin: 0 0 5px 0;
    font-size: 14px;
    color: #333;
}

.cp-file-link {
    color: #0073aa;
    text-decoration: none;
    font-size: 13px;
}

.cp-file-link:hover {
    text-decoration: underline;
}

.cp-no-file {
    color: #999;
    font-size: 13px;
    font-style: italic;
}

.cp-voices-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cp-voice-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 6px;
    background: white;
    cursor: move;
}

.cp-voice-handle {
    color: #999;
    cursor: grab;
}

.cp-voice-handle:active {
    cursor: grabbing;
}

.cp-voice-info {
    flex: 1;
}

.cp-voice-info h4 {
    margin: 0;
    font-size: 16px;
    color: #333;
}

.cp-voice-division {
    background: #e9ecef;
    color: #495057;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    margin-left: 8px;
}

.cp-voice-files {
    display: flex;
    gap: 10px;
}

.cp-voice-audio {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #0073aa;
    text-decoration: none;
    font-size: 13px;
    padding: 4px 8px;
    border: 1px solid #0073aa;
    border-radius: 3px;
}

.cp-voice-audio:hover {
    background: #e7f3ff;
}

.cp-no-audio {
    color: #999;
    font-size: 13px;
    font-style: italic;
}

.cp-program-attribution {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.cp-program-attribution:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.cp-program-attribution h4 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 0 15px 0;
    color: #333;
}

.cp-redistribute-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.cp-redistribute-btn:hover {
    background: #218838;
}

.cp-attribution-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.cp-voice-attribution {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
}

.cp-voice-attribution h5 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 14px;
    font-weight: 600;
}

.cp-members-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.cp-members-list li {
    padding: 4px 0;
    font-size: 13px;
    color: #666;
}

.cp-removed-members {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
}

.cp-removed-members h5 {
    color: #856404;
}

.cp-voice-placeholder {
    height: 60px;
    background: #f0f0f0;
    border: 2px dashed #ccc;
    border-radius: 6px;
    margin: 5px 0;
}

.cp-voices-manager {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.cp-add-voice-section,
.cp-current-voices-section {
    padding: 20px;
    border: 1px solid #eee;
    border-radius: 6px;
    background: #fafafa;
}

.cp-add-voice-section h4,
.cp-current-voices-section h4 {
    margin: 0 0 15px 0;
    color: #333;
}

.cp-sortable-voices {
    min-height: 100px;
}

.cp-voice-actions {
    display: flex;
    gap: 5px;
}

.cp-remove-voice-btn {
    background: #dc3545;
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 3px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.cp-remove-voice-btn:hover {
    background: #c82333;
}

.cp-current-file {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
    padding: 8px;
    background: #e9ecef;
    border-radius: 4px;
    font-size: 13px;
}

.cp-remove-file-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
}

.cp-remove-file-btn:hover {
    background: #c82333;
}

/* Member List Action Buttons */
.wp-list-table .button.button-small {
    margin-right: 4px; /* Add some space between buttons */
    padding: 5px; /* Adjust padding to make them look neat */
    height: auto; /* Let padding define height */
    line-height: 1; /* Align icon vertically */
    vertical-align: middle; /* Align with text in the row */
}

.wp-list-table .button.button-small .dashicons-before::before {
    font-size: 18px; /* Slightly larger icon */
    width: 18px;
    height: 18px;
}

/* Specific icon colors on hover for better UX */
.wp-list-table .button.dashicons-edit:hover {
    background-color: #e0e0e0;
}

.wp-list-table .button.dashicons-archive:hover {
    background-color: #fff8e1; /* Light yellow */
}

.wp-list-table .button.dashicons-undo:hover {
    background-color: #e8f5e9; /* Light green */
}

.wp-list-table .button.dashicons-trash:hover {
    background-color: #ffebee; /* Light red */
    color: #d32f2f; /* Darker red for the icon */
}

.cp-validation-message {
    display: block;
    margin-top: 5px;
    font-size: 0.9em;
    font-style: italic;
}

.cp-validation-message.error {
    color: #D63638;
}

.cp-validation-message.success {
    color: #2271B1;
}

.cp-app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.cp-app-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    color: #333;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.cp-app-item:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transform: translateY(-2px);
    border-color: #007cba;
}

.cp-app-item img {
    max-width: 80px;
    height: auto;
    margin-bottom: 10px;
}

.cp-app-item h2 {
    font-size: 1.1em;
    margin: 0;
    line-height: 1.2;
}

/* Styles pour les formulaires et listes d'administration frontend */
.cp-choralpro-admin-add-member-wrapper,
.cp-choralpro-admin-edit-member-wrapper,
.cp-choralpro-admin-members-list-wrapper {
    background: #fff;
    border: 1px solid #c3c4c7;
    box-shadow: 0 1px 1px rgba(0,0,0,.04);
    padding: 20px;
    margin-top: 20px;
}

.cp-choralpro-admin-add-member-wrapper h2,
.cp-choralpro-admin-edit-member-wrapper h2,
.cp-choralpro-admin-members-list-wrapper h2 {
    margin-top: 0;
    padding-top: 0;
}

.form-table th {
    width: 200px;
    padding-right: 20px;
}

.form-table td {
    padding-bottom: 10px;
}

.form-table input[type="text"],
.form-table input[type="email"],
.form-table input[type="password"],
.form-table input[type="number"],
.form-table select,
.form-table textarea {
    width: 100%;
    max-width: 400px;
    padding: 8px 10px;
    border: 1px solid #c3c4c7;
    box-shadow: inset 0 1px 2px rgba(0,0,0,.07);
    border-radius: 4px;
}

.form-table textarea {
    min-height: 80px;
}

/* Remplacé .submit par un style direct pour input[type="submit"] */
input[type="submit"].button-primary {
    margin-top: 20px;
    cursor: pointer;
    /* Basic button styles if not already provided by WP core button classes */
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
    box-shadow: none;
    text-shadow: none;
    padding: 8px 12px;
    border-radius: 3px;
    font-size: 14px;
    line-height: 1;
    text-decoration: none;
    display: inline-block;
    -webkit-appearance: none;
    appearance: none;
    transition: background 0.1s ease;
}

input[type="submit"].button-primary:hover,
input[type="submit"].button-primary:focus {
    background: #005177;
    border-color: #005177;
    color: #fff;
}


/* Styles pour la table des membres */
.wp-list-table {
    margin-top: 20px;
}

.wp-list-table th, .wp-list-table td {
    vertical-align: middle;
}

/* Ensure dashicons are visible in buttons */
.button.dashicons-before:before {
    vertical-align: middle;
    margin-right: 6px;
}

.button-small.dashicons-before {
    padding-left: 28px; /* Adjust padding for icon */
}

/* Style for action links as small buttons */
.button.button-small,
a.button.button-small,
a.button-small.dashicons-before {
    height: 28px; /* Standard small button height */
    line-height: 26px; /* Center text vertically */
    padding: 0 10px; /* Standard small button padding */
    font-size: 13px; /* Standard small button font size */
    vertical-align: middle; /* Align with text */
    margin-right: 5px; /* Spacing between buttons */
    text-decoration: none;
    display: inline-block; /* Ensure it acts like a block for sizing */
    border-radius: 3px;
    background: #f3f4f5;
    border: 1px solid #c3c4c7;
    color: #1e1e1e;
    box-shadow: none;
    text-shadow: none;
    transition: background 0.1s ease;
}

.button.button-small:hover,
a.button.button-small:hover,
a.button-small.dashicons-before:hover {
    background: #e0e0e0;
    border-color: #8c8f94;
    color: #000;
}

/* Specific colors for icons when part of a button link */
a.button-small.dashicons-before.dashicons-edit:before { color: #0073aa; }
a.button-small.dashicons-before.dashicons-archive:before { color: #82878c; }
a.button-small.dashicons-before.dashicons-undo:before { color: #46b450; }
a.button-small.dashicons-before.dashicons-trash:before { color: #dc3232; }


/* Admin Notices (for frontend messages) */
.notice {
    padding: 12px;
    margin: 5px 0 15px;
    background: #fff;
    border-left: 4px solid #fff;
    box-shadow: 0 1px 1px rgba(0,0,0,.04);
}

.notice-success {
    border-left-color: #46b450;
}

.notice-error {
    border-left-color: #dc3232;
}

.notice.is-dismissible {
    padding-right: 38px;
    position: relative;
}

.notice.is-dismissible .notice-dismiss {
    position: absolute;
    top: 0;
    right: 0;
    padding: 9px;
    text-decoration: none;
    border: none;
    background: none;
    cursor: pointer;
}

.notice.is-dismissible .notice-dismiss:before {
    content: "\f153";
    font: normal 20px/1 'dashicons';
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-decoration: none !important;
    padding: 0;
    color: #a0a5aa;
}

/* Style for the top-left dashboard return link */
p.cp-back-to-dashboard-link-top {
    margin-bottom: 20px; /* Space it out from the content */
}