/**
 * Frontend Styles for Hari Katha Plugin
 */

/* Container */
#hari-katha-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Filters */
.hari-katha-filters {
    background: linear-gradient(135deg, #F0A93D 0%, #da5a1a 100%);
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    color: white;
    position: relative;
    overflow: hidden;
}

.hari-katha-filters::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    z-index: 1;
}

.hari-katha-filters > * {
    position: relative;
    z-index: 2;
}

/* Single line search container */
.hari-katha-search-container {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;
    background: rgba(255,255,255,0.95);
    padding: 8px;
    border-radius: 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255,255,255,0.3);
}

.search-input-wrapper {
    position: relative;
    flex: 1;
    min-width: 200px;
}

.date-input-wrapper {
    position: relative;
    min-width: 150px;
}

.search-icon, .date-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: #666;
    z-index: 3;
    pointer-events: none;
}

.search-input-wrapper input[type="text"],
.date-input-wrapper input[type="date"] {
    width: 100%;
    padding: 12px 15px 12px 40px;
    border: 2px solid transparent;
    border-radius: 20px;
    font-size: 14px;
    background: rgba(255,255,255,0.8);
    color: #333;
    transition: all 0.3s ease;
    outline: none;
}

.search-input-wrapper input[type="text"]:focus,
.date-input-wrapper input[type="date"]:focus {
    border-color: #F0A93D;
    background: rgba(255,255,255,1);
    box-shadow: 0 0 0 3px rgba(240, 169, 61, 0.1);
}

.search-input-wrapper input[type="text"]::placeholder {
    color: #999;
    font-style: italic;
}

.search-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}

.search-buttons button {
    padding: 12px 20px;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: none;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

#hari-katha-search-btn {
    background: linear-gradient(45deg, #F0A93D, #da5a1a);
    color: white;
    box-shadow: 0 3px 10px rgba(240, 169, 61, 0.3);
}

#hari-katha-search-btn:hover {
    background: linear-gradient(45deg, #da5a1a, #F0A93D);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(240, 169, 61, 0.4);
}

#hari-katha-reset-btn {
    background: linear-gradient(45deg, #6c757d, #495057);
    color: white;
    box-shadow: 0 3px 10px rgba(108, 117, 125, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateX(20px);
    transition: all 0.3s ease;
}

#hari-katha-reset-btn:hover {
    background: linear-gradient(45deg, #495057, #6c757d);
    transform: translateY(-2px) translateX(20px);
    box-shadow: 0 5px 15px rgba(108, 117, 125, 0.4);
}

#hari-katha-reset-btn.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

#hari-katha-reset-btn.show:hover {
    transform: translateY(-2px);
}

#hari-katha-reset-btn.reset-btn-hidden {
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateX(20px) !important;
}

/* Responsive design for search container */
@media (max-width: 768px) {
    .hari-katha-search-container {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .search-input-wrapper,
    .date-input-wrapper {
        min-width: 100%;
        flex: 1 1 100%;
    }
    
    .search-buttons {
        width: 100%;
        justify-content: center;
    }
    
    .search-buttons button {
        flex: 1;
        max-width: 120px;
    }
}

/* Full Width List Layout */
.hari-katha-horizontal-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
    padding: 10px 0;
}


/* Individual Items - Professional Layout */
.hari-katha-item {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    flex: 1 1 100%;
    width: 100%;
    display: flex;
    align-items: stretch;
    height: auto;
    margin-bottom: 24px;
    position: relative;
}

.hari-katha-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
    border-color: #d1d5db;
}

/* Left Section: Image */
.hari-katha-image-section {
    flex: 0 0 280px;
    background: #f8fafc;
    display: flex;
    justify-content: center;
    overflow: hidden;
    min-height: 200px;
    max-height: 280px;
    border-right: 1px solid #e5e7eb;
}

.hari-katha-image-section img {
    width: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}

.hari-katha-item:hover .hari-katha-image-section img {
    transform: scale(1.02);
}

.hari-katha-no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: #f1f5f9;
    color: #64748b;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Middle Section: Details */
.hari-katha-details-section {
    flex: 1;
    padding: 32px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: #ffffff;
    position: relative;
}

/* Right Section: YouTube Link */
.hari-katha-youtube-section {
    flex: 0 0 200px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    min-height: 200px;
    border-left: 1px solid #e5e7eb;
}

/* YouTube Link Styling */
.youtube-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #ffffff;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    padding: 24px 20px;
    border-radius: 16px;
    background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
    border: none;
    box-shadow: 0 4px 15px rgba(255, 0, 0, 0.3);
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.youtube-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.youtube-link:hover::before {
    left: 100%;
}

.youtube-link:hover {
    background: linear-gradient(135deg, #cc0000 0%, #990000 100%);
    color: white;
    text-decoration: none;
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(255, 0, 0, 0.4);
}

.youtube-icon {
    margin-bottom: 12px;
    transition: transform 0.3s ease;
    position: relative;
    z-index: 2;
}

.youtube-link:hover .youtube-icon {
    transform: scale(1.15);
}

.youtube-link span {
    position: relative;
    z-index: 2;
    font-size: 14px;
    letter-spacing: 0.5px;
}

.hari-katha-no-youtube {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: #f8fafc;
    color: #64748b;
    font-size: 12px;
    font-weight: 500;
    border-radius: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 2px dashed #cbd5e1;
    padding: 20px;
}

.no-video-icon {
    margin-bottom: 8px;
    opacity: 0.6;
}

.hari-katha-title {
    font-size: 24px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 16px 0;
    line-height: 1.4;
    letter-spacing: -0.025em;
}

.hari-katha-description {
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 20px;
    font-size: 15px;
    flex: 1;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    font-weight: 400;
}

.hari-katha-meta {
    margin-bottom: 0;
}

.hari-katha-dates {
    margin-bottom: 12px;
    font-size: 14px;
    color: #4b5563;
    font-weight: 500;
}

.hari-katha-dates strong {
    color: #374151;
    font-weight: 600;
}

.hari-katha-place {
    margin-bottom: 12px;
    font-size: 14px;
    color: #4b5563;
    font-weight: 500;
}

.hari-katha-place strong {
    color: #374151;
    font-weight: 600;
}

.hari-katha-status {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid;
}

.status-upcoming {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #dbeafe;
}

.status-ongoing {
    background: #f0fdf4;
    color: #16a34a;
    border-color: #dcfce7;
}

.status-completed {
    background: #faf5ff;
    color: #9333ea;
    border-color: #e9d5ff;
}

.status-cancelled {
    background: #fef2f2;
    color: #dc2626;
    border-color: #fecaca;
}


/* Loading */
#hari-katha-loading {
    text-align: center;
    padding: 40px;
    font-size: 18px;
    color: #666;
}

/* Pagination */
.hari-katha-pagination {
    margin-top: 30px;
    text-align: center;
}

.hari-katha-pagination-info {
    margin-bottom: 15px;
    color: #666;
    font-size: 14px;
}

.hari-katha-pagination-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.pagination-btn {
    padding: 8px 12px;
    border: 2px solid #F0A93D;
    background: white;
    color: #F0A93D;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 40px;
    text-align: center;
}

.pagination-btn:hover {
    background: #F0A93D;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(240, 169, 61, 0.3);
}

.pagination-btn.active {
    background: #F0A93D;
    color: white;
    font-weight: 600;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.pagination-btn:disabled:hover {
    background: white;
    color: #F0A93D;
    transform: none;
    box-shadow: none;
}

.pagination-ellipsis {
    padding: 8px 4px;
    color: #666;
    font-weight: bold;
}

.prev-btn, .next-btn {
    font-weight: 600;
}

/* Responsive pagination */
@media (max-width: 768px) {
    .hari-katha-pagination-buttons {
        gap: 3px;
    }
    
    .pagination-btn {
        padding: 6px 10px;
        font-size: 13px;
        min-width: 35px;
    }
    
    .hari-katha-pagination-info {
        font-size: 13px;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hari-katha-item {
        flex-direction: column;
        height: auto;
    }
    
    .hari-katha-image-section {
        flex: 0 0 250px;
        order: 1;
        min-height: 250px;
        max-height: 300px;
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
    }
    
    .hari-katha-details-section {
        order: 2;
        padding: 24px;
    }
    
    .hari-katha-youtube-section {
        flex: 0 0 100px;
        order: 3;
        padding: 16px;
        min-height: 100px;
        border-left: none;
        border-top: 1px solid #e5e7eb;
    }
    
    .youtube-link {
        flex-direction: row;
        padding: 16px 20px;
        border-radius: 12px;
    }
    
    .youtube-icon {
        margin-bottom: 0;
        margin-right: 12px;
    }
    
    .youtube-icon svg {
        width: 24px;
        height: 24px;
    }
    
    .youtube-link span {
        font-size: 13px;
    }
    
    .search-filter {
        flex-direction: column;
        gap: 15px;
    }
    
    .search-input-wrapper {
        min-width: 100%;
        width: 100%;
    }
    
    .search-filter input[type="text"] {
        min-width: 100%;
        width: 100%;
    }
    
    .search-filter button {
        width: 100%;
        padding: 12px 20px;
    }
    
    .date-filter {
        flex-direction: column;
        align-items: stretch;
    }
    
    .date-filter > * {
        margin-bottom: 10px;
    }
    
    .hari-katha-filters {
        padding: 15px;
    }
    
    #hari-katha-container {
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .hari-katha-image-section {
        flex: 0 0 200px;
        min-height: 200px;
        max-height: 250px;
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
    }
    
    .hari-katha-details-section {
        padding: 12px;
    }
    
    .hari-katha-title {
        font-size: 18px;
    }
    
    .hari-katha-description {
        font-size: 12px;
    }
    
    .hari-katha-dates,
    .hari-katha-place {
        font-size: 11px;
    }
    
    .hari-katha-status {
        font-size: 9px;
        padding: 2px 6px;
    }
    
    .hari-katha-youtube-section {
        flex: 0 0 80px;
        min-height: 80px;
        padding: 12px;
        border-left: none;
        border-top: 1px solid #e5e7eb;
    }
    
    .search-filter {
        gap: 12px;
    }
    
    .search-filter input[type="text"] {
        padding: 12px 16px;
        font-size: 14px;
    }
    
    .search-filter button,
    .date-filter button {
        width: 100%;
        padding: 12px 16px;
        font-size: 14px;
    }
    
    .date-filter {
        padding: 15px;
        gap: 15px;
    }
    
    .date-filter input[type="date"] {
        padding: 10px 14px;
        font-size: 14px;
    }
    
    .hari-katha-item {
        margin-bottom: 15px;
    }
    
    .youtube-link {
        padding: 12px 16px;
        font-size: 11px;
        border-radius: 10px;
    }
    
    .youtube-icon svg {
        width: 20px;
        height: 20px;
    }
    
    .youtube-link span {
        font-size: 11px;
    }
}

/* No results message */
.hari-katha-no-results {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 18px;
}

/* Error message */
.hari-katha-error {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    border: 1px solid #f5c6cb;
}
