/* Agência May Shorts - Frontend Styles */

/* ========== BUTTON ========== */
.agmay-shorts-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    min-height: 44px;
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    color: #fff !important;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    text-decoration: none;
}

.agmay-shorts-btn * {
    color: inherit;
}

.agmay-shorts-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.4);
}

.agmay-shorts-btn-link {
    background: transparent !important;
    color: #7c3aed !important;
    padding: 8px 0;
    min-height: auto;
}

.agmay-shorts-btn-link:hover {
    background: transparent !important;
    box-shadow: none;
    text-decoration: underline;
    transform: none;
}

.agmay-shorts-btn-pill {
    border-radius: 50px;
    padding: 10px 20px;
}

.agmay-shorts-btn-icon {
    font-size: 16px;
    line-height: 1;
    display: inline-block;
}

.agmay-shorts-btn-text {
    font-size: 14px;
    line-height: 1.2;
}

.agmay-shorts-btn-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
}

/* ========== FLOATING BUBBLE ========== */
.agmay-shorts-bubble {
    position: fixed;
    z-index: 9998;
    cursor: pointer;
    transition: all 0.3s ease;
}

.agmay-shorts-bubble:hover {
    transform: scale(1.1);
}

.agmay-shorts-bubble-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.agmay-shorts-bubble-inner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.agmay-shorts-bubble-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 28px;
    color: #fff;
    z-index: 2;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* Video Preview inside bubble */
.agmay-shorts-bubble-video {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.agmay-shorts-bubble-video iframe,
.agmay-shorts-bubble-video video {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300%;
    height: 300%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    border: none;
    object-fit: cover;
}

.agmay-shorts-bubble-ring {
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: #7c3aed;
    border-right-color: #6d28d9;
    animation: bubble-spin 2s linear infinite;
    pointer-events: none;
}

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

.agmay-shorts-bubble-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    z-index: 6;
}

/* ========== MODAL ========== */
.agmay-shorts-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
}

.agmay-shorts-modal.active {
    display: flex;
}

.agmay-shorts-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    animation: fadeIn 0.3s ease;
}

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

.agmay-shorts-modal-container {
    position: relative;
    width: 100%;
    max-width: var(--agmay-player-width, 400px);
    height: var(--agmay-player-height, 90vh);
    max-height: 90vh;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(50px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

.agmay-shorts-modal-close {
    position: absolute;
    top: -50px;
    right: 0;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10;
}

.agmay-shorts-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ========== PLAYER ========== */
.agmay-shorts-player {
    width: 100%;
    height: 100%;
    background: #000;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
}

.agmay-shorts-video-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
}

.agmay-shorts-video {
    width: 100%;
    height: 100%;
}

.agmay-shorts-video iframe,
.agmay-shorts-video video {
    width: 100%;
    height: 100%;
    border: none;
    background: #000;
}

/* Hide video controls */
.agmay-shorts-video video::-webkit-media-controls {
    display: none !important;
}

.agmay-shorts-video video::-webkit-media-controls-enclosure {
    display: none !important;
}

.agmay-shorts-video video::-webkit-media-controls-panel {
    display: none !important;
}

/* Progress Bars (Instagram/Reels style) */
.agmay-shorts-progress {
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    z-index: 10;
}

.agmay-shorts-progress-bars {
    display: flex;
    gap: 4px;
}

.agmay-shorts-progress-bar {
    flex: 1;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    overflow: hidden;
}

.agmay-shorts-progress-bar-fill {
    height: 100%;
    background: #fff;
    width: 0%;
    transition: width 0.1s linear;
}

.agmay-shorts-progress-bar.active .agmay-shorts-progress-bar-fill {
    animation: progress-fill 15s linear forwards;
}

.agmay-shorts-progress-bar.completed .agmay-shorts-progress-bar-fill {
    width: 100%;
}

@keyframes progress-fill {
    from { width: 0%; }
    to { width: 100%; }
}

/* Navigation */
.agmay-shorts-nav {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 10px;
    pointer-events: none;
}

.agmay-shorts-nav-btn {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    pointer-events: auto;
    opacity: 0;
}

.agmay-shorts-player:hover .agmay-shorts-nav-btn {
    opacity: 1;
}

.agmay-shorts-nav-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.agmay-shorts-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Info */
.agmay-shorts-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 60px 16px 16px;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 100%);
    color: #fff;
}

.agmay-shorts-title {
    margin: 0 0 4px;
    font-size: 14px;
    font-weight: 500;
}

.agmay-shorts-platform {
    font-size: 12px;
    opacity: 0.7;
    text-transform: capitalize;
}

/* Platform Icons */
.agmay-shorts-platform::before {
    margin-right: 6px;
}

.agmay-shorts-platform[data-platform="youtube"]::before {
    content: "▶";
    color: #ff0000;
}

.agmay-shorts-platform[data-platform="instagram"]::before {
    content: "📷";
}

.agmay-shorts-platform[data-platform="tiktok"]::before {
    content: "♪";
}

.agmay-shorts-platform[data-platform="vimeo"]::before {
    content: "▶";
    color: #1ab7ea;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 480px) {
    .agmay-shorts-modal-container {
        max-width: 100%;
        height: 100vh;
        max-height: none;
    }
    
    .agmay-shorts-player {
        border-radius: 0;
    }
    
    .agmay-shorts-modal-close {
        top: 10px;
        right: 10px;
        background: rgba(0, 0, 0, 0.5);
    }
    
    .agmay-shorts-bubble {
        bottom: 80px;
    }
}
