/* Nextcloud WordPress Integration Styles */

/* Container für eingebettete Inhalte */
.ncwp-embed-container {
    margin: 20px 0;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.ncwp-iframe {
    display: block;
    border: none;
    width: 100%;
}

/* Kalender-Container */
.ncwp-calendar-container {
    margin: 20px 0;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.ncwp-calendar-iframe {
    display: block;
    border: none;
}

/* Dateiliste */
.ncwp-file-list {
    margin: 20px 0;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
}

.ncwp-file-list ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ncwp-file-item {
    display: flex;
    align-items: center;
    padding: 12px;
    margin-bottom: 8px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 3px;
    transition: all 0.2s ease;
}

.ncwp-file-item:hover {
    background: #f5f5f5;
    border-color: #0073aa;
    box-shadow: 0 2px 4px rgba(0, 115, 170, 0.1);
}

.ncwp-file-item:last-child {
    margin-bottom: 0;
}

.ncwp-file-icon {
    font-size: 24px;
    margin-right: 12px;
    flex-shrink: 0;
}

.ncwp-file-name {
    flex-grow: 1;
    font-weight: 500;
    color: #333;
}

.ncwp-file-size {
    color: #666;
    font-size: 0.9em;
    margin-left: 10px;
    flex-shrink: 0;
}

/* Widget-Styles */
.widget .ncwp-file-list {
    margin: 10px 0;
    padding: 10px;
}

.widget .ncwp-file-item {
    padding: 8px;
    font-size: 0.9em;
}

.widget .ncwp-file-icon {
    font-size: 20px;
    margin-right: 8px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ncwp-file-item {
        flex-wrap: wrap;
    }
    
    .ncwp-file-size {
        width: 100%;
        margin-left: 36px;
        margin-top: 4px;
        font-size: 0.85em;
    }
    
    .ncwp-iframe,
    .ncwp-calendar-iframe {
        min-height: 400px;
    }
}

/* Loading-Animation */
.ncwp-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 115, 170, 0.2);
    border-radius: 50%;
    border-top-color: #0073aa;
    animation: ncwp-spin 1s ease-in-out infinite;
}

@keyframes ncwp-spin {
    to { transform: rotate(360deg); }
}

/* Fehlermeldungen */
.ncwp-error {
    background: #f8d7da;
    color: #721c24;
    padding: 12px;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    margin: 10px 0;
}

/* Erfolgsmeldungen */
.ncwp-success {
    background: #d4edda;
    color: #155724;
    padding: 12px;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
    margin: 10px 0;
}

/* Admin-Seite Anpassungen */
.ncwp-usage-guide code {
    font-family: 'Courier New', monospace;
    font-size: 13px;
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .ncwp-file-list {
        background: #1e1e1e;
        border-color: #444;
    }
    
    .ncwp-file-item {
        background: #2d2d2d;
        border-color: #444;
        color: #e0e0e0;
    }
    
    .ncwp-file-item:hover {
        background: #3d3d3d;
        border-color: #0073aa;
    }
    
    .ncwp-file-name {
        color: #e0e0e0;
    }
    
    .ncwp-file-size {
        color: #999;
    }
}

/* Link-Buttons */
.ncwp-link-button,
.ncwp-download-button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #0082c9;
    color: #fff !important;
    text-decoration: none !important;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-weight: 500;
    margin: 5px;
    border: none;
    cursor: pointer;
}

.ncwp-link-button:hover,
.ncwp-download-button:hover {
    background-color: #006ba3;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 130, 201, 0.3);
    color: #fff !important;
}

.ncwp-link-button:active,
.ncwp-download-button:active {
    transform: translateY(0);
}

/* Stilvoller Button */
.ncwp-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    background-color: #0082c9;
    color: #fff !important;
    text-decoration: none !important;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-weight: 600;
    margin: 10px 5px;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.ncwp-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    color: #fff !important;
    opacity: 0.9;
}

.ncwp-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Button-Größen */
.ncwp-btn-small {
    padding: 8px 16px;
    font-size: 14px;
}

.ncwp-btn-medium {
    padding: 12px 24px;
    font-size: 16px;
}

.ncwp-btn-large {
    padding: 16px 32px;
    font-size: 18px;
}

/* Button-Container */
.ncwp-buttons-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
}

/* Responsive Buttons */
@media (max-width: 768px) {
    .ncwp-button,
    .ncwp-link-button,
    .ncwp-download-button {
        width: 100%;
        text-align: center;
        margin: 5px 0;
    }
    
    .ncwp-buttons-container {
        flex-direction: column;
    }
}

/* CSP-Warnung */
.ncwp-csp-warning {
    background: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
    padding: 15px;
    border-radius: 4px;
    margin: 20px 0;
}

.ncwp-csp-warning strong {
    display: block;
    margin-bottom: 5px;
    font-size: 16px;
}

.ncwp-csp-warning p {
    margin: 5px 0;
}

.ncwp-csp-warning a {
    color: #0073aa;
    text-decoration: underline;
}

/* Info-Box */
.ncwp-info-box {
    background: #e7f3ff;
    border-left: 4px solid #0073aa;
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
}

.ncwp-info-box p {
    margin: 5px 0;
    color: #333;
}
