/**
 * ChurchOnline Public Styles
 * Inspired by tpctoronto.online.church
 */

/* Reset and Base */
.churchonline-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #1a1a1a;
    color: #fff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.churchonline-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: #2d2d2d;
    border-bottom: 1px solid #3d3d3d;
}

.churchonline-header-left {
    display: flex;
    align-items: center;
}

.churchonline-logo {
    height: 36px;
    width: auto;
}

.churchonline-logo-placeholder {
    width: 36px;
    height: 36px;
    background: #4a90e2;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 18px;
}

.churchonline-nav {
    display: flex;
    align-items: center;
    gap: 25px;
}

.churchonline-nav-link {
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: opacity 0.2s;
}

.churchonline-nav-link:hover {
    opacity: 0.8;
}

.churchonline-nav-link-give {
    background: #4a90e2;
    padding: 8px 16px;
    border-radius: 4px;
}

.churchonline-menu-btn {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 8px;
}

.churchonline-menu-btn svg {
    width: 24px;
    height: 24px;
}

/* Main Content */
.churchonline-main {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Video Section */
.churchonline-video-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #000;
}

.churchonline-video-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.churchonline-video-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: #1a1a1a;
}

.churchonline-welcome-text {
    font-size: 14px;
    color: #ccc;
}

.churchonline-share-btn {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 8px;
}

.churchonline-share-btn svg {
    width: 20px;
    height: 20px;
}

.churchonline-video-player {
    flex: 1;
    position: relative;
    background: #000;
}

.churchonline-video-player iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.churchonline-video-info {
    padding: 15px 20px;
    background: #1a1a1a;
}

.churchonline-service-title {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
}

.churchonline-no-service {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    padding: 40px;
}

.churchonline-no-service h2 {
    margin: 0 0 10px;
    font-weight: 400;
}

.churchonline-no-service p {
    color: #888;
}

/* Sidebar */
.churchonline-sidebar {
    width: 350px;
    background: #f5f5f5;
    color: #333;
    overflow-y: auto;
    border-left: 1px solid #ddd;
}

/* Countdown Section */
.churchonline-countdown-section {
    background: #fff;
    padding: 20px;
    border-bottom: 1px solid #ddd;
}

.churchonline-countdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.churchonline-countdown-header h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    color: #666;
}

.churchonline-timezone-selector select {
    font-size: 12px;
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
}

.churchonline-countdown-service {
    text-align: center;
}

.churchonline-service-time {
    font-size: 28px;
    font-weight: 600;
    color: #333;
}

.churchonline-service-name {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
}

.churchonline-countdown {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.churchonline-countdown-item {
    text-align: center;
}

.churchonline-countdown-number {
    display: block;
    width: 70px;
    height: 50px;
    background: #f0f0f0;
    border-radius: 8px;
    font-size: 24px;
    font-weight: 600;
    color: #333;
    line-height: 50px;
}

.churchonline-countdown-label {
    display: block;
    font-size: 10px;
    color: #888;
    text-transform: uppercase;
    margin-top: 5px;
}

.churchonline-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #e53935;
    color: #fff;
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 14px;
}

.churchonline-live-dot {
    width: 10px;
    height: 10px;
    background: #fff;
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Upcoming Section */
.churchonline-upcoming-section {
    padding: 20px;
}

.churchonline-upcoming-date {
    font-size: 12px;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    margin: 0 0 10px;
}

.churchonline-upcoming-item {
    background: #fff;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.churchonline-upcoming-time {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.churchonline-upcoming-title {
    font-size: 13px;
    color: #666;
}

/* Login Prompt */
.churchonline-login-prompt {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    background: #fff;
    border-top: 1px solid #ddd;
}

.churchonline-login-icon {
    width: 40px;
    height: 40px;
    background: #ff9800;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.churchonline-login-icon svg {
    width: 20px;
    height: 20px;
    color: #fff;
}

.churchonline-login-prompt p {
    margin: 0;
    font-size: 13px;
    color: #666;
    flex: 1;
}

.churchonline-login-btn {
    background: none;
    border: 1px solid #333;
    color: #333;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.churchonline-login-btn:hover {
    background: #333;
    color: #fff;
}

/* Bottom Tabs */
.churchonline-tabs {
    display: flex;
    background: #fff;
    border-top: 1px solid #ddd;
}

.churchonline-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px;
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
}

.churchonline-tab svg {
    width: 24px;
    height: 24px;
    margin-bottom: 4px;
}

.churchonline-tab span {
    font-size: 11px;
}

.churchonline-tab:hover {
    color: #333;
    background: #f5f5f5;
}

.churchonline-tab-active {
    color: #4a90e2;
    background: #f0f7ff;
}

/* Panels */
.churchonline-panels {
    position: relative;
}

.churchonline-panel {
    display: none;
    background: #fff;
    color: #333;
    max-height: 400px;
    overflow-y: auto;
}

.churchonline-panel-active {
    display: block;
}

.churchonline-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    border-bottom: 1px solid #ddd;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 10;
}

.churchonline-panel-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.churchonline-panel-close {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 5px;
}

.churchonline-panel-close svg {
    width: 20px;
    height: 20px;
}

.churchonline-panel-content {
    padding: 20px;
}

/* Prayer Form */
.churchonline-prayer-form {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.churchonline-prayer-form h4 {
    margin: 0 0 15px;
    font-size: 14px;
    color: #333;
}

.churchonline-form-group {
    margin-bottom: 12px;
}

.churchonline-input,
.churchonline-textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
}

.churchonline-input:focus,
.churchonline-textarea:focus {
    outline: none;
    border-color: #4a90e2;
}

.churchonline-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #666;
    margin-bottom: 15px;
    cursor: pointer;
}

.churchonline-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.churchonline-btn-primary {
    background: #4a90e2;
    color: #fff;
}

.churchonline-btn-primary:hover {
    background: #3a7bc8;
}

.churchonline-btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.churchonline-btn-secondary:hover {
    background: #e0e0e0;
}

.churchonline-btn-full {
    width: 100%;
}

/* Prayers List */
.churchonline-prayers-list h4 {
    margin: 0 0 15px;
    font-size: 14px;
    color: #333;
}

.churchonline-prayer-item {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 12px;
}

.churchonline-prayer-content {
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    margin-bottom: 10px;
}

.churchonline-prayer-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.churchonline-prayer-author {
    font-size: 12px;
    color: #888;
}

.churchonline-pray-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    background: none;
    border: 1px solid #ddd;
    color: #666;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.churchonline-pray-btn:hover {
    background: #ffebee;
    border-color: #e53935;
    color: #e53935;
}

.churchonline-pray-btn svg {
    width: 14px;
    height: 14px;
}

/* Schedule */
.churchonline-schedule-list h4 {
    margin: 20px 0 10px;
    font-size: 12px;
    color: #888;
    text-transform: uppercase;
}

.churchonline-schedule-list h4:first-child {
    margin-top: 0;
}

.churchonline-schedule-item {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
}

.churchonline-schedule-time {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.churchonline-schedule-title {
    font-size: 14px;
    color: #333;
}

.churchonline-schedule-desc {
    font-size: 12px;
    color: #888;
    margin-top: 5px;
}

/* Notes */
.churchonline-notes-form {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.churchonline-notes-textarea {
    flex: 1;
    min-height: 200px;
    resize: vertical;
    font-family: inherit;
    line-height: 1.6;
}

.churchonline-notes-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.churchonline-login-required {
    text-align: center;
    padding: 40px 20px;
}

.churchonline-login-required p {
    margin: 0 0 20px;
    color: #666;
}

/* Bible */
.churchonline-bible-container {
    height: 400px;
}

.churchonline-bible-iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Modals */
.churchonline-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.churchonline-modal-content {
    background: #fff;
    border-radius: 8px;
    width: 100%;
    max-width: 450px;
    max-height: 90vh;
    overflow-y: auto;
}

.churchonline-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

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

.churchonline-modal-close {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 5px;
}

.churchonline-modal-close svg {
    width: 20px;
    height: 20px;
}

.churchonline-modal-body {
    padding: 20px;
}

/* Share Modal */
.churchonline-share-url {
    display: flex;
    gap: 10px;
    margin: 15px 0;
}

.churchonline-share-url input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.churchonline-share-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.churchonline-share-btn {
    flex: 1;
    padding: 10px;
    border-radius: 4px;
    text-align: center;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
}

.churchonline-share-facebook {
    background: #3b5998;
    color: #fff;
}

.churchonline-share-twitter {
    background: #1da1f2;
    color: #fff;
}

.churchonline-share-email {
    background: #f0f0f0;
    color: #333;
}

/* Login Modal */
.churchonline-login-tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.churchonline-login-tab {
    flex: 1;
    padding: 12px;
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 14px;
    border-bottom: 2px solid transparent;
}

.churchonline-login-tab-active {
    color: #4a90e2;
    border-bottom-color: #4a90e2;
}

.churchonline-login-panel {
    display: none;
}

.churchonline-login-panel-active {
    display: block;
}

/* No Data */
.churchonline-no-data {
    text-align: center;
    padding: 30px;
    color: #888;
}

/* Responsive */
@media (max-width: 900px) {
    .churchonline-main {
        flex-direction: column;
    }
    
    .churchonline-sidebar {
        width: 100%;
        max-height: 300px;
        border-left: none;
        border-top: 1px solid #ddd;
    }
    
    .churchonline-nav {
        display: none;
    }
}

@media (max-width: 600px) {
    .churchonline-countdown {
        gap: 8px;
    }
    
    .churchonline-countdown-number {
        width: 55px;
        height: 40px;
        font-size: 18px;
        line-height: 40px;
    }
    
    .churchonline-tab span {
        font-size: 10px;
    }
}
