/**
 * Video Submission Grid - Frontend-Styles
 * Modernes, responsives Design
 */

/* ==========================================================================
   Allgemeine Styles
   ========================================================================== */

.vsg-complete-gallery {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* ==========================================================================
   Nachrichten und Benachrichtigungen
   ========================================================================== */

.vsg-message {
    padding: 15px 20px;
    margin: 15px 0;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
}

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

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

.vsg-message.vsg-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.vsg-message.vsg-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* ==========================================================================
   Benutzer-Status
   ========================================================================== */

.vsg-user-status {
    background: #f8f9fa;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    text-align: right;
}

.vsg-welcome {
    font-size: 14px;
    color: #333;
}

.vsg-welcome a,
.vsg-login-prompt a {
    color: #0073aa;
    text-decoration: none;
    font-weight: 600;
}

.vsg-welcome a:hover,
.vsg-login-prompt a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   Formulare (Version 1.3.0 - Vereinfacht)
   ========================================================================== */

/* 
   HINWEIS: Die Auth-Formulare (Login/Registrierung) verwenden jetzt 
   Inline-CSS, um Theme-Konflikte zu vermeiden.
   Diese Styles gelten nur für andere Formulare (z.B. Video-Einreichung).
*/

.vsg-form {
    background: #ffffff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.vsg-submission-form h3 {
    margin-top: 0;
    margin-bottom: 25px;
    color: #333;
    font-size: 24px;
    font-weight: 600;
}

.vsg-form-group {
    margin-bottom: 20px;
}

.vsg-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
    font-size: 14px;
}

.vsg-form-group input[type="url"],
.vsg-form-group input[type="text"],
.vsg-form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.vsg-form-group input:focus,
.vsg-form-group textarea:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0,115,170,0.1);
}

.vsg-form-group textarea {
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
}

.vsg-form-group small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 12px;
}

/* Buttons */
.vsg-button {
    padding: 12px 30px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.vsg-button-primary {
    background: #0073aa;
    color: #ffffff;
}

.vsg-button-primary:hover {
    background: #005a87;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,115,170,0.3);
}

.vsg-button-small {
    padding: 8px 20px;
    font-size: 13px;
}

.vsg-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ==========================================================================
   Video Grid
   ========================================================================== */

.vsg-grid-container {
    margin-top: 30px;
}

.vsg-video-grid {
    display: grid;
    gap: 30px;
    margin-top: 20px;
}

.vsg-video-grid[data-columns="1"] {
    grid-template-columns: 1fr;
}

.vsg-video-grid[data-columns="2"] {
    grid-template-columns: repeat(2, 1fr);
}

.vsg-video-grid[data-columns="3"] {
    grid-template-columns: repeat(3, 1fr);
}

.vsg-video-grid[data-columns="4"] {
    grid-template-columns: repeat(4, 1fr);
}

/* Responsive Grid */
@media (max-width: 1024px) {
    .vsg-video-grid[data-columns="4"],
    .vsg-video-grid[data-columns="3"] {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .vsg-video-grid {
        grid-template-columns: 1fr !important;
    }
}

.vsg-video-item {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.vsg-video-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.vsg-video-wrapper {
    position: relative;
}

.vsg-video-embed {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    background: #000;
}

.vsg-video-embed iframe,
.vsg-video-embed blockquote {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.vsg-video-meta {
    padding: 20px;
}

.vsg-video-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 13px;
    color: #666;
    flex-wrap: wrap;
    gap: 10px;
}

.vsg-video-author strong {
    color: #333;
}

.vsg-video-date {
    color: #999;
}

.vsg-video-description {
    margin: 15px 0;
    color: #555;
    font-size: 14px;
    line-height: 1.6;
    border-left: 3px solid #0073aa;
    padding-left: 15px;
}

.vsg-video-actions {
    margin-top: 15px;
}

.vsg-toggle-comments {
    background: #f0f0f0;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    color: #333;
    transition: background 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.vsg-toggle-comments:hover {
    background: #e0e0e0;
}

.vsg-comment-icon {
    font-size: 16px;
}

.vsg-no-videos {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 12px;
}

.vsg-no-videos p {
    color: #666;
    font-size: 16px;
}

/* ==========================================================================
   Kommentare
   ========================================================================== */

.vsg-comments-section {
    border-top: 1px solid #e0e0e0;
    margin-top: 20px;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.vsg-comments-container {
    padding: 20px;
}

.vsg-comments-container h4 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    font-size: 18px;
}

.vsg-comment-form {
    margin-bottom: 25px;
}

.vsg-comment-form textarea,
.vsg-reply-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    box-sizing: border-box;
}

.vsg-comment-form textarea:focus,
.vsg-reply-form textarea:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0,115,170,0.1);
}

.vsg-comment-form button,
.vsg-reply-form button {
    margin-top: 10px;
}

.vsg-comments-list {
    margin-top: 20px;
}

.vsg-no-comments {
    text-align: center;
    color: #999;
    font-style: italic;
    padding: 30px;
}

.vsg-comment {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    border-left: 3px solid #0073aa;
}

.vsg-comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 10px;
}

.vsg-comment-author {
    font-weight: 600;
    color: #0073aa;
    font-size: 14px;
}

.vsg-comment-time {
    font-size: 12px;
    color: #999;
}

.vsg-comment-text {
    color: #555;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 10px;
}

.vsg-reply-button {
    background: transparent;
    border: none;
    color: #0073aa;
    font-size: 12px;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background 0.3s;
}

.vsg-reply-button:hover {
    background: rgba(0,115,170,0.1);
}

.vsg-reply-form {
    margin-top: 15px;
    padding: 15px;
    background: #ffffff;
    border-radius: 6px;
}

.vsg-cancel-reply {
    background: #f0f0f0;
    color: #333;
    margin-left: 10px;
}

.vsg-cancel-reply:hover {
    background: #e0e0e0;
}

/* ==========================================================================
   Auth Forms Toggle
   ========================================================================== */

.vsg-auth-forms {
    margin-top: 20px;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ==========================================================================
   Responsive Anpassungen
   ========================================================================== */

@media (max-width: 768px) {
    .vsg-complete-gallery {
        padding: 10px;
    }
    
    .vsg-form {
        padding: 20px;
    }
    
    .vsg-video-meta {
        padding: 15px;
    }
    
    .vsg-comments-container {
        padding: 15px;
    }
    
    .vsg-comment {
        padding: 12px;
    }
}

/* ==========================================================================
   Loading States
   ========================================================================== */

.vsg-loading {
    opacity: 0.6;
    pointer-events: none;
}

.vsg-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0,115,170,0.3);
    border-radius: 50%;
    border-top-color: #0073aa;
    animation: spin 0.8s linear infinite;
}

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