/**
 * Strimly Admin Styles
 * 
 * @package Strimly_Video_Embedder
 */

/* Admin Container */
.strimly-admin-container {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.strimly-admin-content {
    flex: 2;
}

.strimly-admin-sidebar {
    flex: 1;
}

/* Info Boxes */
.strimly-info-box {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.strimly-info-box h3 {
    margin-top: 0;
    color: #23282d;
    font-size: 16px;
    font-weight: 600;
}

.strimly-info-box h4 {
    margin-bottom: 10px;
    color: #23282d;
    font-size: 14px;
    font-weight: 600;
}

.strimly-info-box ul {
    margin-left: 20px;
    margin-bottom: 15px;
}

.strimly-info-box li {
    margin-bottom: 5px;
}

.strimly-info-box code {
    background: #f1f1f1;
    padding: 2px 4px;
    border-radius: 3px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 12px;
}

/* Connection Section */
.strimly-connection-section {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.strimly-connection-section h3 {
    margin-top: 0;
    color: #23282d;
    font-size: 16px;
    font-weight: 600;
}

/* Status Messages */
.strimly-status-message {
    margin-top: 10px;
    padding: 10px;
    border-radius: 4px;
    font-weight: 500;
}

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

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

/* Form Fields */
.strimly-admin-content input[type="email"],
.strimly-admin-content input[type="text"] {
    width: 100%;
    max-width: 400px;
}

.strimly-admin-content .description {
    color: #666;
    font-style: italic;
    margin-top: 5px;
}

/* Buttons */
.strimly-test-connection {
    background: #0073aa;
    border-color: #0073aa;
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.strimly-test-connection:hover {
    background: #005177;
    border-color: #005177;
}

.strimly-test-connection:disabled {
    background: #ccc;
    border-color: #ccc;
    cursor: not-allowed;
}

/* Video Library Styles */
.strimly-video-library-container {
    margin-top: 20px;
}

.strimly-status-box {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 20px;
}

.strimly-loading {
    color: #666;
    font-style: italic;
}

.strimly-video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.strimly-video-card {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.2s;
}

.strimly-video-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.strimly-video-thumbnail {
    width: 100%;
    height: 150px;
    background: #f5f5f5;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    position: relative;
}

.strimly-video-thumbnail .strimly-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 123, 255, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.strimly-video-info h3 {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: #23282d;
}

.strimly-video-meta {
    font-size: 12px;
    color: #666;
    margin-bottom: 15px;
}

.strimly-video-meta span {
    display: block;
    margin-bottom: 5px;
}

.strimly-video-status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
}

.strimly-video-status.completed {
    background: #d4edda;
    color: #155724;
}

.strimly-video-status.processing {
    background: #fff3cd;
    color: #856404;
}

.strimly-video-status.failed {
    background: #f8d7da;
    color: #721c24;
}

.strimly-video-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.strimly-video-actions button {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}

.strimly-video-actions button:hover {
    background: #f5f5f5;
}

.strimly-video-actions .strimly-copy-btn {
    background: #0073aa;
    color: white;
    border-color: #0073aa;
}

.strimly-video-actions .strimly-copy-btn:hover {
    background: #005177;
}

/* Loading and Error States */
.strimly-loading-state,
.strimly-error-state,
.strimly-empty-state {
    text-align: center;
    padding: 40px 20px;
}

.strimly-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0073aa;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.strimly-empty-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

/* Settings Section */
.strimly-settings-section {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.strimly-settings-section h3 {
    margin-top: 0;
    color: #23282d;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
}

/* Settings Fields */
.strimly-field-wrapper {
    margin-bottom: 20px;
    padding: 15px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.strimly-field-wrapper label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    color: #23282d;
}

.strimly-field-wrapper input[type="email"],
.strimly-field-wrapper input[type="text"] {
    width: 100%;
    max-width: 400px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.strimly-field-wrapper .description {
    margin-top: 5px;
    color: #666;
    font-style: italic;
}

/* Video Library Specific Styles */
.strimly-video-thumbnail {
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    background: #f5f5f5;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    position: relative;
    overflow: hidden;
}

.strimly-video-thumbnail iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 4px;
}

.strimly-copy-shortcode-btn {
    background: #6f42c1;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 10px;
    font-size: 12px;
}

.strimly-copy-shortcode-btn:hover {
    background: #5a32a3;
}

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

.strimly-video-actions button {
    background: #0073aa;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 10px;
    font-size: 12px;
}

.strimly-video-actions button:hover {
    background: #005a87;
}

.strimly-video-details-expanded {
    margin-top: 20px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 4px;
    border-top: 1px solid #eee;
}

.strimly-video-details-expanded h4 {
    margin: 15px 0 10px 0;
    color: #333;
}

.strimly-embed-code {
    background: #f5f5f5;
    padding: 10px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 12px;
    overflow-x: auto;
    margin-bottom: 10px;
}

.strimly-copy-button {
    background: #28a745;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.strimly-copy-button:hover {
    background: #218838;
}

/* Responsive Design */
@media (max-width: 768px) {
    .strimly-admin-container {
        flex-direction: column;
    }
    
    .strimly-video-grid {
        grid-template-columns: 1fr;
    }
    
    .strimly-modal-content {
        width: 95%;
        margin: 10% auto;
    }
} 