/**
 * Church24-7 Members - Shortcode Styles
 * Beautiful UI with Church24-7 branding (#000000, #B91C1C)
 */

/* ========================================
   VARIABLES
   ======================================== */
:root {
    --c247-black: #000000;
    --c247-red: #B91C1C;
    --c247-red-dark: #991B1B;
    --c247-gray-dark: #1F1F1F;
    --c247-gray: #6B6B6B;
    --c247-gray-light: #E5E5E5;
    --c247-gray-lighter: #F5F5F5;
    --c247-white: #FFFFFF;
    --c247-success: #10B981;
    --c247-error: #EF4444;
    --c247-warning: #F59E0B;
}

/* ========================================
   FORMS - BASE STYLES
   ======================================== */
.c247-form {
    max-width: 600px;
    margin: 0 auto;
    padding: 40px;
    background: var(--c247-white);
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.c247-form-title {
    margin: 0 0 24px 0;
    font-size: 24px;
    font-weight: 700;
    color: var(--c247-black);
    text-align: center;
}

.c247-form-group {
    margin-bottom: 24px;
}

.c247-form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--c247-gray-dark);
}

.c247-form-group label .required {
    color: var(--c247-red);
}

.c247-form-group small {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: var(--c247-gray);
}

.c247-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 768px) {
    .c247-form-row {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   INPUTS
   ======================================== */
.c247-input,
.c247-textarea,
.c247-select {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    color: var(--c247-gray-dark);
    background: var(--c247-white);
    border: 2px solid var(--c247-gray-light);
    border-radius: 8px;
    transition: all 0.3s;
}

.c247-input:focus,
.c247-textarea:focus,
.c247-select:focus {
    outline: none;
    border-color: var(--c247-red);
    box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.1);
}

.c247-textarea {
    resize: vertical;
    min-height: 100px;
}

.c247-input-file {
    display: block;
    width: 100%;
    padding: 10px;
    font-size: 14px;
    border: 2px dashed var(--c247-gray-light);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.c247-input-file:hover {
    border-color: var(--c247-red);
    background: var(--c247-gray-lighter);
}

/* ========================================
   BUTTONS
   ======================================== */
.c247-btn {
    display: inline-block;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.c247-btn-primary {
    color: var(--c247-white);
    background: var(--c247-red);
    border-color: var(--c247-red);
}

.c247-btn-primary:hover {
    background: var(--c247-red-dark);
    border-color: var(--c247-red-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(185, 28, 28, 0.3);
}

.c247-btn-secondary {
    color: var(--c247-gray-dark);
    background: var(--c247-white);
    border-color: var(--c247-gray-light);
}

.c247-btn-secondary:hover {
    border-color: var(--c247-black);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.c247-btn-outline {
    color: var(--c247-red);
    background: transparent;
    border-color: var(--c247-red);
}

.c247-btn-outline:hover {
    color: var(--c247-white);
    background: var(--c247-red);
}

.c247-btn-block {
    display: block;
    width: 100%;
}

.c247-btn-sm {
    padding: 8px 16px;
    font-size: 14px;
}

.c247-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ========================================
   CHECKBOXES
   ======================================== */
.c247-checkbox-group label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.c247-checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    cursor: pointer;
}

/* ========================================
   FORM FOOTER
   ======================================== */
.c247-form-footer {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--c247-gray-light);
    text-align: center;
    font-size: 14px;
    color: var(--c247-gray);
}

.c247-link {
    color: var(--c247-red);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.c247-link:hover {
    color: var(--c247-red-dark);
    text-decoration: underline;
}

.c247-separator {
    margin: 0 10px;
    color: var(--c247-gray-light);
}

/* ========================================
   NOTICES
   ======================================== */
.c247-notice {
    padding: 16px 20px;
    margin: 20px 0;
    border-radius: 8px;
    border-left: 4px solid;
}

.c247-notice-success {
    color: #065F46;
    background: #D1FAE5;
    border-color: var(--c247-success);
}

.c247-notice-error {
    color: #991B1B;
    background: #FEE2E2;
    border-color: var(--c247-error);
}

.c247-notice-info {
    color: #1E40AF;
    background: #DBEAFE;
    border-color: #3B82F6;
}

/* ========================================
   PROFILE
   ======================================== */
.c247-profile-wrapper {
    max-width: 900px;
    margin: 0 auto;
}

.c247-profile-header {
    display: flex;
    align-items: center;
    gap: 30px;
    padding: 40px;
    background: var(--c247-white);
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.c247-profile-avatar img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 4px solid var(--c247-red);
}

.c247-profile-name {
    margin: 0 0 8px 0;
    font-size: 32px;
    font-weight: 700;
    color: var(--c247-black);
}

.c247-profile-role {
    margin: 0 0 16px 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--c247-red);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.c247-profile-bio {
    margin: 0;
    font-size: 16px;
    color: var(--c247-gray);
    line-height: 1.6;
}

.c247-profile-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.c247-stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px;
    background: var(--c247-white);
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s;
}

.c247-stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.c247-stat-value {
    font-size: 48px;
    font-weight: 700;
    color: var(--c247-red);
    line-height: 1;
}

.c247-stat-label {
    margin-top: 8px;
    font-size: 14px;
    color: var(--c247-gray);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.c247-profile-actions {
    text-align: center;
}

@media (max-width: 768px) {
    .c247-profile-header {
        flex-direction: column;
        text-align: center;
    }
    
    .c247-profile-stats {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   MEMBER DIRECTORY
   ======================================== */
.c247-directory-wrapper {
    max-width: 1200px;
    margin: 0 auto;
}

.c247-directory-filters {
    margin-bottom: 30px;
}

.c247-search-input {
    max-width: 400px;
    margin-bottom: 20px;
}

.c247-filter-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.c247-filter-btn {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    color: var(--c247-gray);
    background: var(--c247-white);
    border: 2px solid var(--c247-gray-light);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.c247-filter-btn:hover {
    border-color: var(--c247-red);
    color: var(--c247-red);
}

.c247-filter-btn.active {
    color: var(--c247-white);
    background: var(--c247-red);
    border-color: var(--c247-red);
}

.c247-directory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.c247-member-card {
    padding: 30px;
    background: var(--c247-white);
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: all 0.3s;
}

.c247-member-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.c247-member-avatar img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 3px solid var(--c247-red);
    margin-bottom: 16px;
}

.c247-member-name {
    margin: 0 0 8px 0;
    font-size: 20px;
    font-weight: 700;
    color: var(--c247-black);
}

.c247-member-role {
    margin: 0 0 16px 0;
    font-size: 12px;
    font-weight: 600;
    color: var(--c247-red);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.c247-member-stats {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    font-size: 14px;
    color: var(--c247-gray);
}

/* ========================================
   BADGES
   ======================================== */
.c247-badges-wrapper {
    max-width: 900px;
    margin: 0 auto;
}

.c247-badges-wrapper h3 {
    margin: 0 0 24px 0;
    font-size: 24px;
    font-weight: 700;
    color: var(--c247-black);
}

.c247-badges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.c247-badge-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--c247-white);
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
}

.c247-badge-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.c247-badge-icon {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--c247-gray-lighter);
    border-radius: 12px;
}

.c247-badge-icon img {
    width: 40px;
    height: 40px;
}

.c247-badge-emoji {
    font-size: 32px;
}

.c247-badge-info h4 {
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--c247-black);
}

.c247-badge-info p {
    margin: 0 0 4px 0;
    font-size: 13px;
    color: var(--c247-gray);
}

.c247-badge-info small {
    font-size: 12px;
    color: var(--c247-gray);
}

/* ========================================
   VIDEO UPLOAD
   ======================================== */
#upload-progress {
    margin: 20px 0;
    text-align: center;
}

#upload-progress-bar {
    width: 100%;
    height: 30px;
    border-radius: 8px;
}

#upload-percent {
    display: block;
    margin-top: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--c247-red);
}

/* ========================================
   VIDEOS GRID
   ======================================== */
.c247-videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.c247-video-card {
    background: var(--c247-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
}

.c247-video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.c247-video-player {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
}

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

.c247-video-info {
    padding: 20px;
}

.c247-video-info h4 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--c247-black);
}

.c247-video-info p {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: var(--c247-gray);
}

.c247-video-info small {
    font-size: 12px;
    color: var(--c247-gray);
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
    .c247-form {
        padding: 24px;
    }
    
    .c247-directory-grid,
    .c247-videos-grid {
        grid-template-columns: 1fr;
    }
    
    .c247-badges-grid {
        grid-template-columns: 1fr;
    }
}
