/* ClipRush Twitch Authenticator Styles - Version 2.0 */

/* ========================================
   Login Container & Form
   ======================================== */
.cliprush-twitch-login-container {
    max-width: 400px;
    margin: 20px auto;
    padding: 30px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.cliprush-twitch-login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Consent Checkbox */
.cliprush-twitch-consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.cliprush-twitch-consent label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.5;
}

.cliprush-twitch-consent input[type="checkbox"] {
    margin-top: 3px;
    cursor: pointer;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* Login Button */
.cliprush-twitch-login-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 24px;
    background-color: #9146FF;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cliprush-twitch-login-button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.cliprush-twitch-login-button:not(:disabled):hover {
    background-color: #772CE8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(145, 70, 255, 0.4);
}

.cliprush-twitch-icon {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

/* ========================================
   Channel Info Display
   ======================================== */
.cliprush-twitch-channel-info {
    max-width: 600px;
    margin: 20px auto;
    padding: 30px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.cliprush-twitch-profile {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.cliprush-twitch-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid #9146FF;
}

.cliprush-twitch-details h3 {
    margin: 0 0 5px 0;
    font-size: 24px;
    color: #333;
}

.cliprush-twitch-username {
    margin: 0 0 5px 0;
    font-size: 16px;
    color: #9146FF;
    font-weight: 500;
}

.cliprush-twitch-email,
.cliprush-twitch-type,
.cliprush-twitch-views {
    margin: 0 0 5px 0;
    font-size: 14px;
    color: #666;
}

/* Actions */
.cliprush-twitch-actions {
    text-align: center;
}

.cliprush-twitch-disconnect-button {
    display: inline-block;
    padding: 12px 24px;
    background-color: #dc3545;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.cliprush-twitch-disconnect-button:hover {
    background-color: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
    color: #fff;
}

.cliprush-twitch-disclaimer {
    margin-top: 15px;
    font-size: 12px;
    color: #666;
    font-style: italic;
    line-height: 1.4;
}

/* ========================================
   Clip Submission Form
   ======================================== */
.cliprush-clip-submit-container {
    max-width: 600px;
    margin: 20px auto;
    padding: 30px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.cliprush-clip-submit-container h2 {
    margin-top: 0;
    color: #333;
}

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

.cliprush-clip-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.cliprush-clip-form input[type="text"],
.cliprush-clip-form input[type="url"],
.cliprush-clip-form select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.cliprush-clip-form input:focus,
.cliprush-clip-form select:focus {
    outline: none;
    border-color: #9146FF;
}

.cliprush-clip-form input[readonly] {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

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

.cliprush-submit-button {
    width: 100%;
    padding: 12px;
    background-color: #9146FF;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cliprush-submit-button:hover {
    background-color: #772CE8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(145, 70, 255, 0.4);
}

.cliprush-submit-button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* Info Boxes */
.cliprush-info-box {
    padding: 12px 15px;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.5;
}

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

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

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

/* Submit Messages */
.submit-message {
    padding: 15px;
    border-radius: 4px;
    margin-top: 20px;
    font-size: 14px;
}

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

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

/* ========================================
   Clips Display Grid
   ======================================== */
.cliprush-clips-container {
    max-width: 1200px;
    margin: 20px auto;
}

.cliprush-clips-filters {
    margin-bottom: 30px;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.clips-filter-form select {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
}

.cliprush-clips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.clip-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.clip-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.clip-embed {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
}

.clip-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.clip-info {
    padding: 15px;
}

.clip-streamer {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: #333;
}

.clip-submitter {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #666;
}

.clip-category {
    margin: 0 0 10px 0;
}

.category-badge {
    display: inline-block;
    padding: 4px 10px;
    background-color: #9146FF;
    color: #fff;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.clip-meta {
    margin: 0;
    font-size: 12px;
    color: #999;
}

.no-clips {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 16px;
}

/* ========================================
   Twitch Profile Widget
   ======================================== */
.cliprush-twitch-widget {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.cliprush-twitch-widget .widget-avatar {
    flex-shrink: 0;
}

.cliprush-twitch-widget .widget-avatar img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid #9146FF;
}

.cliprush-twitch-widget .widget-info h4 {
    margin: 0 0 5px 0;
    font-size: 16px;
    color: #333;
}

.cliprush-twitch-widget .widget-username {
    margin: 0 0 5px 0;
    font-size: 14px;
    color: #9146FF;
    font-weight: 500;
}

.cliprush-twitch-widget .widget-views {
    margin: 0;
    font-size: 12px;
    color: #666;
}

/* ========================================
   Messages & Notifications
   ======================================== */
.cliprush-twitch-message,
.cliprush-twitch-error {
    max-width: 600px;
    margin: 20px auto;
    padding: 15px 20px;
    border-radius: 4px;
    text-align: center;
}

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

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

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 768px) {
    .cliprush-twitch-login-container,
    .cliprush-twitch-channel-info,
    .cliprush-clip-submit-container {
        margin: 10px;
        padding: 20px;
    }
    
    .cliprush-twitch-profile {
        flex-direction: column;
        text-align: center;
    }
    
    .cliprush-twitch-consent label {
        font-size: 13px;
    }
    
    .cliprush-clips-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .cliprush-twitch-widget {
        flex-direction: column;
        text-align: center;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .cliprush-clips-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ========================================
   Accessibility
   ======================================== */
*:focus {
    outline: 2px solid #9146FF;
    outline-offset: 2px;
}

button:focus,
a:focus,
input:focus,
select:focus {
    outline: 2px solid #9146FF;
    outline-offset: 2px;
}

/* ========================================
   Print Styles
   ======================================== */
@media print {
    .cliprush-twitch-disconnect-button,
    .cliprush-submit-button,
    .cliprush-twitch-login-button {
        display: none;
    }
}
