/**
 * Solidarity Events Manager - Frontend Styles
 * Main CSS file for all public-facing components
 * 
 * @package SolidarityEvents
 * @version 1.2.0
 */

/* ============================================
   VARIABLES & RESET
   ============================================ */
:root {
    --solidevt-primary: #2563eb;
    --solidevt-primary-dark: #1e40af;
    --solidevt-success: #10b981;
    --solidevt-warning: #f59e0b;
    --solidevt-danger: #ef4444;
    --solidevt-gray-50: #f9fafb;
    --solidevt-gray-100: #f3f4f6;
    --solidevt-gray-200: #e5e7eb;
    --solidevt-gray-300: #d1d5db;
    --solidevt-gray-500: #6b7280;
    --solidevt-gray-700: #374151;
    --solidevt-gray-900: #111827;
    --solidevt-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --solidevt-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    --solidevt-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --solidevt-radius: 8px;
    --solidevt-radius-lg: 12px;
}

.solidevt-event-page *,
.solidevt-booking-form-wrap *,
.solidevt-events-container * {
    box-sizing: border-box;
}

/* ============================================
   BUTTONS
   ============================================ */
.solidevt-btn {
    display: inline-block;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: var(--solidevt-radius);
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.solidevt-btn-primary:hover {
    background: var(--solidevt-primary-dark);
    border-color: var(--solidevt-primary-dark);
    color: white;
}

.solidevt-btn-secondary {
    background: white;
    color: var(--solidevt-gray-700);
    border-color: var(--solidevt-gray-300);
}

.solidevt-btn-secondary:hover {
    background: var(--solidevt-gray-50);
    color: var(--solidevt-gray-900);
}

.solidevt-btn-danger {
    background: var(--solidevt-danger);
    color: white;
    border-color: var(--solidevt-danger);
}

.solidevt-btn-success {
    background: var(--solidevt-success);
    color: white;
    border-color: var(--solidevt-success);
}

.solidevt-btn-small {
    padding: 6px 12px;
    font-size: 12px;
}

.solidevt-btn-large {
    padding: 14px 28px;
    font-size: 16px;
}

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

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

/* ============================================
   MESSAGES
   ============================================ */
.solidevt-message {
    padding: 16px;
    margin-bottom: 20px;
    border-radius: var(--solidevt-radius);
    border-left: 4px solid;
}

.solidevt-message-success {
    background: #d1fae5;
    border-color: var(--solidevt-success);
    color: #065f46;
}

.solidevt-message-error {
    background: #fee2e2;
    border-color: var(--solidevt-danger);
    color: #991b1b;
}

.solidevt-message-warning {
    background: #fef3c7;
    border-color: var(--solidevt-warning);
    color: #92400e;
}

.solidevt-message-info {
    background: #dbeafe;
    border-color: var(--solidevt-primary);
    color: #1e40af;
}

/* ============================================
   EVENT PAGE
   ============================================ */
.solidevt-event-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    overflow: visible;
}

/* Event Header - Full Width */
.solidevt-event-header {
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: calc(-50vw + 50%) !important;
    margin-right: calc(-50vw + 50%) !important;
    margin-top: -20px;
    margin-bottom: 30px;
    position: relative;
}

.solidevt-event-media {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
}

.solidevt-event-logo {
    text-align: center;
    margin-bottom: 20px;
    padding: 0 20px;
}

.solidevt-logo-img {
    max-width: 200px;
    height: auto;
    display: block;
    margin: 0 auto;
}

.solidevt-event-page .solidevt-event-header .solidevt-event-media .solidevt-header-image,
.solidevt-event-page .solidevt-header-image,
.solidevt-header-image {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
    height: auto !important;
    display: block !important;
    object-fit: cover;
    margin: 0 !important;
    padding: 0 !important;
}

.solidevt-video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}

.solidevt-video-wrapper iframe,
.solidevt-video-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.solidevt-event-title-section {
    margin: 30px 0;
}

.solidevt-event-title {
    font-size: 36px;
    font-weight: 700;
    color: var(--solidevt-gray-900);
    margin: 0 0 20px 0;
}

.solidevt-event-meta-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 20px;
    background: var(--solidevt-gray-50);
    border-radius: var(--solidevt-radius);
    margin-top: 20px;
}

.solidevt-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.solidevt-meta-icon {
    font-size: 20px;
}

.solidevt-meta-text {
    font-size: 14px;
    color: var(--solidevt-gray-700);
}

.solidevt-event-description {
    margin: 40px 0;
}

.solidevt-event-description h2 {
    font-size: 24px;
    margin-bottom: 20px;
    color: var(--solidevt-gray-900);
}

.solidevt-event-content {
    line-height: 1.8;
    color: var(--solidevt-gray-700);
}

/* Badges */
.solidevt-badge {
    display: inline-block;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 20px;
    text-transform: uppercase;
}

.solidevt-badge-large {
    padding: 10px 20px;
    font-size: 14px;
}

.solidevt-badge-sold-out {
    background: var(--solidevt-danger);
    color: white;
}

.solidevt-badge-almost-sold {
    background: var(--solidevt-warning);
    color: white;
}

/* Stats Section */
.solidevt-event-stats-public {
    margin: 40px 0;
    padding: 30px;
    background: var(--solidevt-gray-50);
    border-radius: var(--solidevt-radius-lg);
}

.solidevt-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.solidevt-stat-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: white;
    border-radius: var(--solidevt-radius);
    box-shadow: var(--solidevt-shadow-sm);
}

.solidevt-stat-icon {
    font-size: 32px;
}

.solidevt-stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--solidevt-gray-900);
}

.solidevt-stat-label {
    font-size: 14px;
    color: var(--solidevt-gray-500);
}

.solidevt-progress-bar {
    height: 12px;
    background: var(--solidevt-gray-200);
    border-radius: 6px;
    overflow: hidden;
}

.solidevt-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--solidevt-primary), var(--solidevt-success));
    transition: width 0.3s ease;
}

/* Share Section */
.solidevt-share-section {
    margin: 40px 0;
    padding: 30px;
    background: var(--solidevt-gray-50);
    border-radius: var(--solidevt-radius);
    text-align: center;
}

.solidevt-share-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.solidevt-share-btn {
    padding: 10px 20px;
    border-radius: var(--solidevt-radius);
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.2s;
}

.solidevt-share-btn:hover {
    transform: translateY(-2px);
}

.solidevt-share-facebook {
    background: #1877f2;
    color: white;
}

.solidevt-share-twitter {
    background: #1da1f2;
    color: white;
}

.solidevt-share-whatsapp {
    background: #25d366;
    color: white;
}

.solidevt-share-email {
    background: var(--solidevt-gray-700);
    color: white;
}

/* ============================================
   BOOKING FORM
   ============================================ */
.solidevt-booking-form-wrap {
    position: relative;
    max-width: 600px;
    margin: 0;
    padding: 30px;
    background: white;
    border-radius: var(--solidevt-radius-lg);
    box-shadow: var(--solidevt-shadow-lg);
}

.solidevt-form-section {
    margin-bottom: 30px;
}

.solidevt-form-section h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--solidevt-gray-900);
}

.solidevt-attendee-form {
    margin-bottom: 25px;
    padding: 20px;
    background: var(--solidevt-gray-50);
    border-radius: 8px;
    border-left: 4px solid var(--solidevt-primary);
}

.solidevt-attendee-form h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: var(--solidevt-gray-900);
    font-weight: 600;
}

.solidevt-form-field {
    margin-bottom: 20px;
}

.solidevt-form-field label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--solidevt-gray-700);
}

.solidevt-form-field-required label::after {
    content: ' *';
    color: var(--solidevt-danger);
}

.solidevt-input,
.solidevt-select,
.solidevt-textarea {
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    border: 1px solid var(--solidevt-gray-300);
    border-radius: var(--solidevt-radius);
    transition: border-color 0.2s;
}

.solidevt-input:focus,
.solidevt-select:focus,
.solidevt-textarea:focus {
    outline: none;
    border-color: var(--solidevt-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.solidevt-input-large {
    font-size: 16px;
    padding: 12px 16px;
}

.solidevt-form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.solidevt-number-input {
    display: flex;
    align-items: center;
    gap: 10px;
}

.solidevt-input-number {
    text-align: center;
    font-size: 18px;
    font-weight: 600;
}

.solidevt-number-btn {
    width: 40px;
    height: 40px;
    border: 1px solid var(--solidevt-gray-300);
    background: white;
    border-radius: var(--solidevt-radius);
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.solidevt-number-btn:hover {
    background: var(--solidevt-gray-50);
    border-color: var(--solidevt-primary);
}

.solidevt-price-display,
.solidevt-total-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: var(--solidevt-gray-50);
    border-radius: var(--solidevt-radius);
    margin-top: 15px;
}

.solidevt-total-section {
    background: var(--solidevt-primary);
    color: white;
    font-size: 18px;
    font-weight: 600;
}

.solidevt-payment-methods {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.solidevt-payment-method {
    display: block;
    cursor: pointer;
}

.solidevt-payment-method input[type="radio"] {
    display: none;
}

.solidevt-payment-method-content {
    padding: 15px;
    border: 2px solid var(--solidevt-gray-300);
    border-radius: var(--solidevt-radius);
    transition: all 0.2s;
}

.solidevt-payment-method input:checked + .solidevt-payment-method-content {
    border-color: var(--solidevt-primary);
    background: rgba(37, 99, 235, 0.05);
}

.solidevt-payment-method-title {
    font-weight: 600;
    color: var(--solidevt-gray-900);
}

.solidevt-payment-method-description {
    font-size: 13px;
    color: var(--solidevt-gray-500);
    margin-top: 5px;
}

.solidevt-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: var(--solidevt-radius-lg);
    z-index: 1000;
}

.solidevt-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--solidevt-gray-200);
    border-top-color: var(--solidevt-primary);
    border-radius: 50%;
    animation: solidevt-spin 0.8s linear infinite;
}

@keyframes solidevt-spin {
    to { transform: rotate(360deg); }
}

.solidevt-loading-text {
    margin-top: 15px;
    font-weight: 600;
    color: var(--solidevt-gray-700);
}

/* ============================================
   EVENTS LIST
   ============================================ */
.solidevt-events-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.solidevt-events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.solidevt-columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.solidevt-columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.solidevt-columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

.solidevt-events-list .solidevt-event-card {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.solidevt-event-card {
    background: white;
    border-radius: var(--solidevt-radius-lg);
    box-shadow: var(--solidevt-shadow);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.solidevt-event-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--solidevt-shadow-lg);
}

.solidevt-event-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.solidevt-event-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.solidevt-event-image .solidevt-badge {
    position: absolute;
    top: 10px;
    right: 10px;
}

.solidevt-event-content {
    padding: 20px;
}

.solidevt-event-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
}

.solidevt-event-title a {
    color: var(--solidevt-gray-900);
    text-decoration: none;
}

.solidevt-event-title a:hover {
    color: var(--solidevt-primary);
}

.solidevt-event-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
}

.solidevt-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--solidevt-primary);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .solidevt-event-page {
        padding: 10px;
    }
    
    .solidevt-event-header {
        margin-top: -10px;
    }
    
    .solidevt-event-title {
        font-size: 28px;
    }
    
    .solidevt-event-meta-bar {
        flex-direction: column;
    }
}

/* ============================================
   OVERRIDE THEME IMAGE RESTRICTIONS
   ============================================ */
.solidevt-event-page img.solidevt-header-image {
    max-width: none !important;
    width: 100% !important;
}

/* Force full width for header media container */
.solidevt-event-page .solidevt-event-header .solidevt-event-media {
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    position: relative;
    left: 0 !important;
    right: 0 !important;
}

/**
 * Social Sharing Buttons Styles
 * Add this CSS to your plugin's frontend.css file
 */

/* Social Sharing Section */
.solidevt-social-sharing {
    margin: 40px 0 30px 0;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
}

.solidevt-social-sharing h2 {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 25px 0;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 10px;
}

.solidevt-social-buttons {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 15px !important;
    margin-top: 10px;
}

.solidevt-social-btn {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    padding: 12px 10px !important;
    border-radius: 10px;
    text-decoration: none !important;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.12);
    border: none;
    min-height: 80px;
    text-align: center;
}

.solidevt-social-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.2);
    text-decoration: none;
}

.solidevt-social-btn svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.solidevt-social-label {
    display: block;
    line-height: 1.3;
}

/* Individual Social Colors */
.solidevt-social-facebook {
    background: #1877f2;
    color: white;
}

.solidevt-social-facebook:hover {
    background: #145dbf;
    color: white;
}

.solidevt-social-twitter {
    background: #000000;
    color: white;
}

.solidevt-social-twitter:hover {
    background: #1a1a1a;
    color: white;
}

.solidevt-social-linkedin {
    background: #0077b5;
    color: white;
}

.solidevt-social-linkedin:hover {
    background: #005885;
    color: white;
}

.solidevt-social-whatsapp {
    background: #25d366;
    color: white;
}

.solidevt-social-whatsapp:hover {
    background: #1da851;
    color: white;
}

.solidevt-social-telegram {
    background: #0088cc;
    color: white;
}

.solidevt-social-telegram:hover {
    background: #006699;
    color: white;
}

.solidevt-social-email {
    background: #ea4335;
    color: white;
}

.solidevt-social-email:hover {
    background: #c5221f;
    color: white;
}

.solidevt-social-youtube {
    background: #ff0000;
    color: white;
}

.solidevt-social-youtube:hover {
    background: #cc0000;
    color: white;
}

.solidevt-social-tiktok {
    background: #000000;
    color: white;
}

.solidevt-social-tiktok:hover {
    background: #1a1a1a;
    color: white;
}

/* Responsive */
@media (max-width: 768px) {
    .solidevt-social-buttons {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 12px;
    }

    .solidevt-social-btn {
        padding: 10px 8px;
        min-height: 70px;
        font-size: 12px;
    }
    
    .solidevt-social-btn svg {
        width: 22px;
        height: 22px;
    }
}

@media (max-width: 480px) {
    .solidevt-social-buttons {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .solidevt-social-btn {
        padding: 10px 6px;
        min-height: 65px;
        font-size: 11px;
    }
    
    .solidevt-social-btn svg {
        width: 20px;
        height: 20px;
    }
}
