/* Templates page specific styles */

.frameworks-section.playbook {
    border-bottom: 1px solid #eef0f500;
    max-width: 1200px;
    padding-bottom: 10px;
    padding-right: 0;
}

.frameworks-section.playbook.tabs {
    border-bottom-style: solid;
    margin-bottom: 0px;
    padding-bottom: 10px;
}

/* Template description truncation - limit to 3 lines */
.template-description-link {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
    max-height: calc(1.4em * 3); /* Fallback for browsers that don't support -webkit-line-clamp */
    visibility: visible;
}

/* Remove height constraints from template description links */
.template-description-link.tile {
    min-height: unset;
    max-height: unset;
}

/* Updated bold text styling */
.bold-text-8 {
    color: var(--align-dark-grey);
    font-family: Montserrat, sans-serif;
    font-size: 15px;
    font-weight: 700;
    line-height: 21px;
}

/* Updated template card styling */
.new-card.list-card-view.tile {
    background-color: var(--align-transparent);
    border-bottom-style: none;
    border-radius: 4px;
    margin-bottom: 20px;
    margin-left: 10px;
    margin-right: 0;
}

.new-card-text-area.list-card-view.tile {
    border: 1px solid #e1e1e1;
    background-color: #ffffff80;
    border-radius: 11px;
    width: 197px;
    margin-bottom: 0;
    padding-top: 20px;
    padding-left: 10px;
    padding-right: 0;
}

/* Desktop height override for template cards */
@media (min-width: 768px) {
    .new-card.list-card-view.tile {
        height: 178px;
        padding-top: 3px;
    }
    
    .new-card-text-area.list-card-view.tile {
        height: 175px;
    }
}

/* Hover effects for template cards - matching templates-link-area-modern.purple */
.new-card.list-card-view.tile {
    transition: all 0.2s ease;
}

.new-card.list-card-view.tile:hover {
    box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.new-card-text-area.list-card-view.tile {
    transition: all 0.2s ease;
}

.new-card-text-area.list-card-view.tile:hover {
    box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
    border-color: #d1d5db;
}

/* Icon styling for template cards */
.fr-icons.more {
    border: 1px none var(--align-very-light-grey);
    filter: drop-shadow(0 15px 15px #fff);
    border-radius: 8px;
    width: 185px;
    height: auto;
    margin-bottom: 0;
    margin-left: 3px;
    margin-right: 3px;
}

/* Modern minimalist button styles for Playbook Examples and Sessions */
.modern-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    background-color: #ffffff;
    color: #374151;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 400;
    font-size: 13px;
    transition: all 0.2s ease;
    box-shadow: none;
    border: 1px solid #e5e7eb;
    cursor: pointer;
    min-width: 120px;
    line-height: 1.4;
}

.modern-button:hover {
    background-color: #f9fafb;
    border-color: #d1d5db;
    box-shadow: none;
    transform: none;
}

.modern-button:active {
    transform: none;
    box-shadow: none;
}

.modern-button-secondary {
    background-color: #5062ff;
    color: #ffffff;
    border-color: #5062ff;
}

.modern-button-secondary:hover {
    background-color: #3d4ac3;
    border-color: #3d4ac3;
}

/* Make dashboard button icon white */
.modern-button-secondary img {
    filter: brightness(0) invert(1);
}

/* Make plus icon lighter weight */
.modern-button img[src*="plus-icon"] {
    opacity: 0.7;
}

/* Dashboard button desktop-only right margin */
@media (min-width: 768px) {
    .dashboard-button {
        margin-right: 39px;
    }
}

/* Container for the buttons */
.modern-buttons-container {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 16px;
    margin-bottom: 16px;
}

/* Polished styling for template cards */
.templates-link-area-modern.purple {
    border-style: solid;
    border-color: #e5e7eb;
    background-color: #ffffff;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    text-align: center;
    border-radius: 12px;
    margin-left: 0;
    margin-right: 15px;
    padding-top: 25px;
    transition: all 0.2s ease;
}

.templates-link-area-modern.purple:hover {
    box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
    border-color: #d1d5db;
}

/* Mobile view - remove min-height for template cards */
@media (max-width: 767px) {
    .templates-link-area-modern.purple {
        border-style: solid;
        border-color: #e5e7eb;
        background-color: #ffffff;
        box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
        text-align: center;
        border-radius: 12px;
        margin-left: 0;
        padding-bottom: 20px;
        margin-right: 15px;
        padding-top: 20px;
        transition: all 0.2s ease;
    }
    
    .modern-buttons-container {
        margin-bottom: 0;
    }
    
    .new-card-text-area.list-card-view.tile {
        width: 100%;
        height: auto;
        padding-bottom: 20px;
        display: block;
    }
    
    .new-card.list-card-view.tile {
        width: 100%;
        height: auto;
        padding-right: 30px;
    }
}

/* Small mobile devices (max-width: 479px) */
@media screen and (max-width: 479px) {
    .template-description-link.tile {
        min-height: auto;
        max-height: none;
        padding-right: 10px;
        line-height: 21px;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .new-card-description.list-card-view.tile {
        display: block;
    }
}

/* Playbook Module Styles */
.playbook-module {
    background: #ffffff;
    /* box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06); */
    margin: 24px 0;
    overflow: hidden;
    border: 1px solid #e5e7eb00;
}

.playbook-container {
    max-width: 100%;
    margin: 0 auto;
}

/* Playbook Tabs */
.playbook-tabs {
    display: flex
;
    background: #f9fafb00;
    border-bottom: 1px solid #e5e7eb;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.playbook-tabs::-webkit-scrollbar {
    display: none;
}

.playbook-tab {
    background-color: transparent;
    border: none;
    border-radius: 0;
    margin-top: 0;
    margin-left: 25px;
    margin-right: 25px;
    padding: 15px 10px 15px 10px;
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    position: relative;
}

.playbook-tab:hover {
    color: #374151;
    background: transparent;
    border-radius: 0;
}

.playbook-tab.active {
    color: #5062ff;
    background: transparent;
    margin-top: 0 !important;
    margin-left: 25px !important;
    margin-right: 25px !important;
    padding: 15px 10px 15px 10px;
    border-radius: 0;
    border-bottom: 3px solid #5062ff;
}

/* Playbook Content */
.playbook-content {
    padding: 32px;
}

.playbook-tab-content {
    display: none;
}

.playbook-tab-content.active {
    display: block;
}

/* Video Container */
.video-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto 24px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.video-container iframe {
    display: block;
    width: 100%;
    height: 450px;
    border: none;
}

/* iOS-specific video handling */
@supports (-webkit-touch-callout: none) {
    .video-container iframe {
        /* Prevent iOS from taking over fullscreen */
        pointer-events: auto;
        /* Force inline playback */
        -webkit-playsinline: true;
        playsinline: true;
        /* Disable fullscreen on iOS */
        -webkit-presentation-mode: inline;
    }
    
    .video-wrapper {
        /* Prevent iOS fullscreen takeover */
        position: relative;
        overflow: hidden;
        /* Ensure video stays within container */
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
    }
    
    /* Hide video when tab is not active to prevent iOS issues */
    .playbook-tab-content:not(.active) .video-container iframe {
        pointer-events: none;
        opacity: 0;
        visibility: hidden;
    }
    
    /* Show video when tab becomes active */
    .playbook-tab-content.active .video-container iframe {
        pointer-events: auto;
        opacity: 1;
        visibility: visible;
        transition: opacity 0.3s ease;
    }
}

/* Additional iOS-specific fixes */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
    .video-container iframe {
        /* Additional webkit-specific fixes */
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }
}

/* Prevent any fullscreen takeover on mobile devices */
@media (max-width: 768px) {
    .video-container iframe {
        /* Ensure videos don't take over fullscreen on mobile */
        pointer-events: auto;
        /* Force inline playback on mobile */
        -webkit-playsinline: true;
        playsinline: true;
        /* Disable fullscreen on mobile */
        -webkit-presentation-mode: inline;
    }
    
    .video-wrapper {
        /* Prevent mobile fullscreen takeover */
        position: relative;
        overflow: hidden;
        /* Force hardware acceleration */
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
    }
}

/* General video container states */
.playbook-hidden {
    display: none;
    pointer-events: none;
}

/* Global iOS fullscreen prevention */
@supports (-webkit-touch-callout: none) {
    iframe {
        /* Prevent any iframe from going fullscreen on iOS */
        -webkit-presentation-mode: inline !important;
    }
}

.video-container.loading {
    opacity: 0.7;
    pointer-events: none;
}

.video-container.loaded {
    opacity: 1;
    pointer-events: auto;
}

/* Playbook Overview */
.playbook-overview {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.playbook-overview h3 {
    font-size: 24px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 16px;
}

.playbook-overview p {
    font-size: 16px;
    line-height: 1.6;
    color: #6b7280;
    margin-bottom: 24px;
}

/* Playbook Link */
.playbook-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #5062ff;
    color: #ffffff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: 13px;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.playbook-link:hover {
    background: #3d4ac3;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.playbook-link svg {
    transition: transform 0.2s ease;
}

.playbook-link:hover svg {
    transform: translate(2px, -2px);
}

/* Playbook Toggle Button Active State */
.playbook-toggle-btn.active {
    background: #f3f4f6;
    color: #374151;
    border-color: #d1d5db;
}

.playbook-toggle-btn.active:hover {
    background: #e5e7eb;
    border-color: #9ca3af;
}

/* Desktop: Remove right margin for playbook toggle button */
@media (min-width: 769px) {
    .playbook-toggle-btn {
        margin-right: 0;
    }
}

/* Override problematic .active class properties */
.active {
    max-width: unset !important;
    margin-top: unset !important;
    margin-left: unset !important;
    margin-right: unset !important;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .playbook-tabs {
        padding: 0 16px;
        flex-wrap: nowrap;
        gap: 0;
        justify-content: space-between;
    }
    
    .playbook-tab {
        padding: 12px 12px;
        font-size: 13px;
        margin-left: 8px !important;
        margin-right: 8px !important;
        flex: 1;
        min-width: auto;
        text-align: center;
    }
    
    .playbook-tab.active {
        margin-left: 8px !important;
        margin-right: 8px !important;
    }
    
    .playbook-content {
        padding: 24px 16px;
    }
    
    .video-container iframe {
        height: 200px;
    }
    
    .playbook-overview h3 {
        font-size: 20px;
    }
    
    .playbook-overview p {
        font-size: 14px;
    }
    
    .playbook-link {
        padding: 10px 20px;
        font-size: 12px;
        width: auto;
        justify-content: center;
    }
    
    .modern-buttons-container {
        flex-direction: row;
        gap: 8px;
        align-items: center;
    }
    
    .modern-button {
        width: auto;
        justify-content: center;
    }
    
    .playbook-module {
        margin: 16px 0;
    }
}

@media (max-width: 480px) {
    .playbook-tabs {
        padding: 0 8px;
    }
    
    .playbook-tab {
        font-size: 12px;
        padding: 10px 8px;
        margin-left: 4px !important;
        margin-right: 4px !important;
        min-width: auto;
    }
    
    .playbook-tab.active {
        margin-left: 4px !important;
        margin-right: 4px !important;
    }
    
    .playbook-content {
        padding: 20px 12px;
    }
    
    .video-container iframe {
        height: 180px;
    }
    
    .playbook-overview h3 {
        font-size: 18px;
    }
    
    .playbook-overview p {
        font-size: 13px;
    }
}

@media screen and (max-width: 479px) {
    .choose-category {
        border: 1px none var(--search);
        background-color: var(--search);
        color: var(--align-dark-grey);
        border-radius: 08px;
        margin-right: 12px;
        font-size: 16px;
        display: block;
    }
    
    .choose-category:hover {
        border-style: none !important;
    }
}

/* Directory Category Topics Override */
.directory-category-topics {
    border-right: 1px none var(--ghost-white);
    background-color: var(--align-transparent);
    border-radius: 6px;
    min-height: 100vh;
    margin-top: 42px;
    margin-bottom: 10px;
    padding: 0 0 12px 5px;
} 

/* Notion-like Video Section Styles */
.video-section {
    background: #ffffff;
    border: 1px solid #e1e5e9;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    margin-bottom: 24px;
    transition: box-shadow 0.2s ease;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.video-section:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.video-header {
    padding: 24px 24px 16px 24px;
    border-bottom: 1px solid #f1f3f4;
}

.video-title {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.video-description {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    color: #5f6368;
    margin: 0;
    line-height: 1.5;
}

.video-container {
    position: relative;
    background: #f8f9fa;
}

.video-wrapper {
    position: relative;
    width: 100%;
    background: #000;
    border-radius: 0;
    overflow: hidden;
}

.video-wrapper iframe {
    display: block;
    width: 100%;
    height: 315px;
    border: none;
    background: #000;
}

.video-footer {
    padding: 16px 24px 24px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fafbfc;
    border-top: 1px solid #f1f3f4;
}

.video-meta {
    display: flex;
    gap: 12px;
    align-items: center;
}

.video-duration,
.video-level {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 12px;
    font-weight: 500;
    color: #5f6368;
    background: #e8eaed;
    padding: 4px 8px;
    border-radius: 6px;
    line-height: 1;
}

.video-actions {
    display: flex;
    gap: 8px;
}

.video-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: #ffffff;
    color: #1a73e8;
    border: 1px solid #dadce0;
    border-radius: 6px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1;
}

.video-action-btn:hover {
    background: #f8f9fa;
    border-color: #1a73e8;
    color: #1557b0;
    text-decoration: none;
}

.video-action-btn svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    stroke-width: 2;
}

/* Hide YouTube overlays and metadata */
.video-wrapper iframe {
    display: block;
    width: 100%;
    height: 315px;
    border: none;
    background: #000;
}

/* Additional CSS to hide YouTube overlays */
.video-wrapper {
    position: relative;
    width: 100%;
    background: #000;
    border-radius: 0;
    overflow: hidden;
}

/* Hide YouTube title overlay and other metadata */
.video-wrapper iframe {
    /* Force remove any YouTube overlays */
    pointer-events: auto;
}

/* Hide YouTube player overlays using CSS */
.video-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, transparent 100%);
    pointer-events: none;
    z-index: 1;
}

/* Responsive adjustments for video sections */
@media (max-width: 768px) {
    .video-header {
        padding: 20px 20px 12px 20px;
    }
    
    .video-title {
        font-size: 16px;
    }
    
    .video-description {
        font-size: 13px;
    }
    
    .video-wrapper iframe {
        height: 200px;
    }
    
    .video-footer {
        padding: 12px 20px 20px 20px;
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
    
    .video-meta {
        gap: 8px;
    }
    
    .video-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

@media (max-width: 480px) {
    .video-header {
        padding: 16px 16px 12px 16px;
    }
    
    .video-title {
        font-size: 15px;
    }
    
    .video-description {
        font-size: 12px;
    }
    
    .video-wrapper iframe {
        height: 180px;
    }
    
    .video-footer {
        padding: 12px 16px 16px 16px;
    }
    
    .video-duration,
    .video-level {
        font-size: 11px;
        padding: 3px 6px;
    }
    
    .video-action-btn {
        font-size: 12px;
        padding: 6px 10px;
    }
} 