/**
 * Ananassport Clip Generator - Main Stylesheet
 */
 

/* Clip Button Overlay */
.clip-button-overlay {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

/* VideoJS Clip Button Styles */
.vjs-clip-button-container {
    display: flex;
    align-items: center;
    margin-right: 10px;
}

.vjs-clip-button {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 4px;
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.vjs-clip-button svg {
    width: 16px;
    height: 16px;
    fill: #333;
}

.vjs-clip-button:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.05);
}

.vjs-clip-loading {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #fff;
    font-size: 12px;
}

.vjs-clip-spinner {
    width: 12px;
    height: 12px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.vjs-clip-duration-select {
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    padding: 2px 5px;
    font-size: 11px;
    margin-right: 5px;
}

.vjs-clip-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.9);
    color: #fff;
    padding: 15px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideIn 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    max-width: 300px;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.vjs-clip-notification button {
    background: #007cba;
    color: #fff;
    border: none;
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
}

.vjs-clip-notification button:hover {
    background: #005a87;
}

.vjs-clip-success {
    background: rgba(0, 128, 0, 0.9);
}

.vjs-clip-error {
    background: rgba(255, 0, 0, 0.9);
}

.vjs-clip-login {
    background: rgba(255, 165, 0, 0.9);
}

.vjs-clip-loading {
    background: rgba(52, 152, 219, 0.9) !important;
}

.vjs-clip-loading::before {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

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

.clip-button {
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 10px 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.clip-button:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.clip-button svg {
    width: 20px;
    height: 20px;
}

.clip-button-text {
    white-space: nowrap;
}

.clip-button-loading {
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 10px 15px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.clip-button-loading .spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Clip Generator Widget */
.clip-generator-widget {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.clip-generator-header h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 18px;
}

.clip-generator-header p {
    margin: 0 0 20px 0;
    color: #666;
    font-size: 14px;
}

.clip-duration-selector {
    margin-bottom: 20px;
}

.clip-duration-selector label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.clip-duration-select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    min-width: 100px;
}

.clip-generator-actions {
    margin-bottom: 20px;
}

.clip-generate-btn {
    background: #007cba;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.clip-generate-btn:hover {
    background: #005a87;
    transform: translateY(-1px);
}

.clip-generate-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.clip-status {
    margin-top: 15px;
    padding: 15px;
    background: #e3f2fd;
    border-radius: 6px;
    border-left: 4px solid #2196f3;
}

.clip-loading-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #1976d2;
}

.clip-loading-indicator .spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(33, 150, 243, 0.3);
    border-top: 2px solid #2196f3;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.clip-result {
    margin-top: 15px;
    padding: 15px;
    background: #e8f5e8;
    border-radius: 6px;
    border-left: 4px solid #4caf50;
}

.clip-success-message {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #2e7d32;
    margin-bottom: 15px;
}

.clip-result-actions {
    display: flex;
    gap: 10px;
}

.clip-result-actions button {
    background: #4caf50;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s ease;
}

.clip-result-actions button:hover {
    background: #388e3c;
}

.clip-error-message {
    margin-top: 15px;
    padding: 15px;
    background: #ffebee;
    border-radius: 6px;
    border-left: 4px solid #f44336;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #c62828;
}

/* Error Details Styling */
.clip-error-details {
    margin: 10px 0;
    padding: 15px;
    background: #f8f8f8;
    border-left: 4px solid #dc3232;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 12px;
    line-height: 1.4;
    white-space: pre-wrap;
    word-break: break-word;
    color: #333;
    border-radius: 0 4px 4px 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.clip-error-details:empty {
    display: none;
}

/* Floating Advertisement Button */
.floating-ad-button {
    position: absolute;
    z-index: 9999;
}

.ad-button {
    position: absolute;
    top: 2%;
    right: 2%;
    height: 50px;
    padding: 0 15px;
    background-color: red;
    color: white;
    font-size: clamp(12px, 2vw, 16px);
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
    border: none;
    cursor: pointer;
    z-index: 999;
    white-space: nowrap;
}

.ad-button:hover {
    background-color: darkred;
}

.ad-button-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ad-button-close {
    font-size: 20px;
    font-weight: bold;
    background: white;
    color: red;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    text-align: center;
    line-height: 18px;
    cursor: pointer;
}

.ad-button-close:hover {
    background: #f0f0f0;
}

@media (max-width: 480px) {
    .ad-button {
        height: 40px;
        font-size: clamp(10px, 3vw, 14px);
        padding: 0 10px;
    }
}

/* Clip Modal */
.clip-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
}

.clip-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.clip-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease;
}

.clip-modal-header {
    background: #f8f9fa;
    padding: 20px 25px;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.clip-modal-header h3 {
    margin: 0;
    color: #333;
    font-size: 20px;
}

.clip-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.clip-modal-close:hover {
    background: #e9ecef;
    color: #333;
}

.clip-modal-body {
    padding: 25px;
    min-height: 300px;
}

.clip-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 300px;
    color: #666;
}

.clip-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 123, 255, 0.3);
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

.clip-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 300px;
    color: #dc3545;
    text-align: center;
}

.clip-error-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.clip-error-message {
    font-size: 16px;
    margin-bottom: 20px;
}

.clip-error-retry {
    background: #dc3545;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s ease;
}

.clip-error-retry:hover {
    background: #c82333;
}

.clip-success {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.clip-video-container {
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

.clip-video-container .video-js {
    width: 100%;
    height: 400px;
}

.clip-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.clip-actions button {
    background: #007bff;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.clip-actions button:hover {
    background: #0056b3;
    transform: translateY(-1px);
}

.clip-actions button svg {
    width: 18px;
    height: 18px;
}

.clip-modal-footer {
    background: #f8f9fa;
    padding: 20px 25px;
    border-top: 1px solid #dee2e6;
    text-align: center;
}

.clip-modal-close-btn {
    background: #6c757d;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s ease;
}

.clip-modal-close-btn:hover {
    background: #5a6268;
}

/* Login Modal */
.login-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
}

.login-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.login-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 400px;
    animation: modalSlideIn 0.3s ease;
}

.login-modal-header {
    background: #f8f9fa;
    padding: 20px 25px;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.login-modal-header h3 {
    margin: 0;
    color: #333;
    font-size: 18px;
}

.login-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.login-modal-close:hover {
    background: #e9ecef;
    color: #333;
}

.login-modal-body {
    padding: 25px;
    text-align: center;
}

.login-modal-body p {
    margin: 0 0 25px 0;
    color: #666;
    font-size: 16px;
}

.login-modal-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.login-modal-actions .button {
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.login-modal-actions .button-primary {
    background: #007bff;
    color: #fff;
    border: none;
}

.login-modal-actions .button-primary:hover {
    background: #0056b3;
    color: #fff;
}

.login-modal-actions .button-secondary {
    background: #6c757d;
    color: #fff;
    border: none;
}

.login-modal-actions .button-secondary:hover {
    background: #5a6268;
    color: #fff;
}

/* Notifications */
.clip-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #333;
    color: #fff;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 10001;
    display: flex;
    align-items: center;
    gap: 15px;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s ease;
}

.clip-notification.show {
    transform: translateX(0);
    opacity: 1;
}

.clip-notification-success {
    background: #28a745;
}

.clip-notification-error {
    background: #dc3545;
}

.clip-notification-info {
    background: #17a2b8;
}

.clip-notification-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.clip-notification-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Shortcode Button */
.clip-button-shortcode {
    background: #007bff;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.clip-button-shortcode:hover {
    background: #0056b3;
    transform: translateY(-1px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .clip-modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .clip-modal-header,
    .clip-modal-body,
    .clip-modal-footer {
        padding: 15px;
    }
    
    .clip-actions {
        flex-direction: column;
    }
    
    .clip-actions button {
        width: 100%;
        justify-content: center;
    }
    
    .clip-generator-widget {
        padding: 15px;
    }
    
    .clip-result-actions {
        flex-direction: column;
    }
    
    .clip-result-actions button {
        width: 100%;
    }
    
    .login-modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .login-modal-actions {
        flex-direction: column;
    }
    
    .login-modal-actions .button {
        width: 100%;
        text-align: center;
    }
}

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

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

/* WordPress Integration */
.wp-admin .clip-generator-widget {
    background: #fff;
    border: 1px solid #ccd0d4;
}

.wp-admin .clip-generate-btn {
    background: #0073aa;
}

.wp-admin .clip-generate-btn:hover {
    background: #005a87;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .clip-button,
    .clip-generate-btn,
    .clip-actions button {
        border: 2px solid currentColor;
    }
    
    .clip-modal-content,
    .login-modal-content {
        border: 2px solid #000;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .clip-button,
    .clip-generate-btn,
    .clip-actions button,
    .clip-notification {
        transition: none;
    }
    
    .clip-modal-content,
    .login-modal-content {
        animation: none;
    }
}
