/**
 * CDV iCal Manager Styles
 */

/* Container principal */
#cdv-ical-manager {
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    margin: 15px 0;
    padding: 15px;
}

#cdv-ical-manager h4 {
    margin: 0 0 15px;
    padding: 0 0 10px;
    border-bottom: 1px solid #e0e0e0;
    color: #1d2327;
    font-size: 14px;
}

/* Section d'export */
.cdv-ical-export-section {
    background: #f6f7f7;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 12px;
    margin-bottom: 15px;
}

.cdv-ical-export-section label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #1d2327;
}

.cdv-ical-export-section .cdv-export-row {
    display: flex;
    gap: 8px;
}

.cdv-ical-export-section input[type="text"] {
    flex: 1;
    font-family: monospace;
    font-size: 12px;
    padding: 6px 10px;
    background: #fff;
}

.cdv-ical-export-section .button {
    white-space: nowrap;
}

.cdv-ical-export-section .cdv-help {
    margin-top: 8px;
    color: #646970;
    font-size: 12px;
}

/* Section d'import */
.cdv-ical-import-section {
    margin-bottom: 15px;
}

.cdv-ical-import-section label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #1d2327;
}

/* Formulaire d'ajout */
.cdv-ical-add-form {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.cdv-ical-add-form input[type="url"] {
    flex: 2;
    min-width: 200px;
}

.cdv-ical-add-form input[type="text"] {
    flex: 1;
    min-width: 100px;
    max-width: 150px;
}

/* Liste des URLs */
#cdv-ical-urls-list {
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background: #f6f7f7;
    max-height: 300px;
    overflow-y: auto;
}

.cdv-no-urls {
    padding: 20px;
    text-align: center;
    color: #646970;
    font-style: italic;
    margin: 0;
}

/* Item URL */
.cdv-ical-url-item {
    padding: 12px;
    border-bottom: 1px solid #e0e0e0;
    background: #fff;
}

.cdv-ical-url-item:last-child {
    border-bottom: none;
}

.cdv-ical-url-item:hover {
    background: #f9f9f9;
}

.cdv-ical-url-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.cdv-ical-source {
    font-weight: 600;
    color: #1d2327;
}

.cdv-ical-status {
    font-size: 14px;
}

.cdv-status-success {
    color: #00a32a;
}

.cdv-status-error {
    color: #d63638;
}

.cdv-status-pending {
    color: #dba617;
}

.cdv-remove-ical-url {
    margin-left: auto;
    background: none;
    border: none;
    color: #b32d2e;
    cursor: pointer;
    padding: 2px;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.cdv-remove-ical-url:hover {
    opacity: 1;
}

.cdv-ical-url-content {
    margin-bottom: 6px;
}

.cdv-ical-url-text {
    display: block;
    font-size: 11px;
    color: #646970;
    word-break: break-all;
    background: #f6f7f7;
    padding: 4px 8px;
    border-radius: 3px;
}

.cdv-ical-url-meta {
    font-size: 11px;
    color: #8c8f94;
}

/* Actions */
.cdv-ical-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

/* Messages */
#cdv-ical-message {
    display: none;
    padding: 10px 15px;
    margin: 10px 0;
    border-radius: 4px;
    font-size: 13px;
}

.cdv-message-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.cdv-message-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Loading */
#cdv-ical-loading {
    display: none;
    text-align: center;
    padding: 10px;
    color: #646970;
}

#cdv-ical-loading .spinner {
    display: inline-block;
    visibility: visible;
    float: none;
    margin: 0 5px 0 0;
}

/* Instructions */
.cdv-ical-instructions {
    background: #e7f3ff;
    border: 1px solid #b8daff;
    border-radius: 4px;
    padding: 12px;
    margin-top: 15px;
}

.cdv-ical-instructions h5 {
    margin: 0 0 10px;
    color: #004085;
    font-size: 13px;
}

.cdv-ical-instructions ol {
    margin: 0;
    padding-left: 20px;
    color: #004085;
    font-size: 12px;
}

.cdv-ical-instructions li {
    margin-bottom: 5px;
}

/* Responsive */
@media screen and (max-width: 782px) {
    .cdv-ical-add-form {
        flex-direction: column;
    }
    
    .cdv-ical-add-form input {
        max-width: none !important;
    }
    
    .cdv-ical-export-section .cdv-export-row {
        flex-direction: column;
    }
    
    .cdv-ical-actions {
        flex-direction: column;
    }
}
