/*
 * LocalBuzz Video Contest Platform - Main Styles
 * Version: 4.0.7 - Custom Color Palette
 * Color Scheme: Coral (#fb5f47) | Orange (#feab2d) | Dark Navy (#26343d)
 */

/* Global Styles */
.localbuzz-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Button Styles */
.localbuzz-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    line-height: 1;
}

.localbuzz-btn:hover {
    transform: translateY(-2px);
    text-decoration: none;
}

.localbuzz-btn-primary {
    background: linear-gradient(135deg, #fb5f47 0%, #feab2d 100%);
    color: white;
}

.localbuzz-btn-primary:hover {
    box-shadow: 0 8px 25px rgba(251, 95, 71, 0.3);
    color: white;
}

.localbuzz-btn-secondary {
    background: #f8f9fa;
    color: #26343d;
    border: 1px solid #e1e1e1;
}

.localbuzz-btn-secondary:hover {
    background: #e9ecef;
    color: #26343d;
}

.localbuzz-btn-info {
    background: #feab2d;
    color: white;
}

.localbuzz-btn-info:hover {
    background: #fb9d1a;
    color: white;
}

.localbuzz-btn-success {
    background: #28a745;
    color: white;
}

.localbuzz-btn-success:hover {
    background: #218838;
    color: white;
}

.localbuzz-btn-warning {
    background: #feab2d;
    color: #26343d;
}

.localbuzz-btn-warning:hover {
    background: #fb9d1a;
    color: #26343d;
}

.localbuzz-btn-danger {
    background: #dc3545;
    color: white;
}

.localbuzz-btn-danger:hover {
    background: #c82333;
    color: white;
}

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

.localbuzz-btn-lg {
    padding: 16px 32px;
    font-size: 18px;
}

/* Loading Spinner */
.localbuzz-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: localbuzz-spin 1s linear infinite;
}

@keyframes localbuzz-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Form Styles */
.localbuzz-form {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.localbuzz-form-row {
    margin-bottom: 20px;
}

.localbuzz-form-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.localbuzz-form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #26343d;
}

.localbuzz-form-input,
.localbuzz-form-textarea,
.localbuzz-form-select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e1e1;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.localbuzz-form-input:focus,
.localbuzz-form-textarea:focus,
.localbuzz-form-select:focus {
    border-color: #fb5f47;
    outline: none;
    box-shadow: 0 0 0 3px rgba(251, 95, 71, 0.1);
}

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

.localbuzz-form-help {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 14px;
}

/* Card Styles */
.localbuzz-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: all 0.3s ease;
}

.localbuzz-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.localbuzz-card-header {
    padding: 25px;
    border-bottom: 1px solid #f0f0f0;
}

.localbuzz-card-body {
    padding: 25px;
}

.localbuzz-card-footer {
    padding: 25px;
    background: #f8f9fa;
    border-top: 1px solid #f0f0f0;
}

.localbuzz-card-title {
    margin: 0 0 10px 0;
    font-size: 20px;
    color: #26343d;
}

.localbuzz-card-text {
    margin: 0;
    color: #666;
    line-height: 1.6;
}

/* Grid System */
.localbuzz-grid {
    display: grid;
    gap: 20px;
}

.localbuzz-grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.localbuzz-grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.localbuzz-grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* Alert Messages */
.localbuzz-alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid transparent;
}

.localbuzz-alert-success {
    background: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.localbuzz-alert-error {
    background: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

.localbuzz-alert-warning {
    background: #fff3cd;
    color: #856404;
    border-color: #ffeaa7;
}

.localbuzz-alert-info {
    background: #fff0e6;
    color: #cc6600;
    border-color: #ffe0cc;
}

/* Badge Styles */
.localbuzz-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.localbuzz-badge-primary {
    background: #fb5f47;
    color: white;
}

.localbuzz-badge-success {
    background: #28a745;
    color: white;
}

.localbuzz-badge-warning {
    background: #feab2d;
    color: #26343d;
}

.localbuzz-badge-danger {
    background: #dc3545;
    color: white;
}

.localbuzz-badge-secondary {
    background: #26343d;
    color: white;
}

/* Progress Bar */
.localbuzz-progress {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.localbuzz-progress-bar {
    height: 100%;
    background: linear-gradient(135deg, #fb5f47 0%, #feab2d 100%);
    transition: width 0.3s ease;
}

.localbuzz-progress-sm {
    height: 6px;
}

.localbuzz-progress-lg {
    height: 12px;
}

/* Modal Styles */
.localbuzz-modal, .modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
}

.localbuzz-modal-content, .modal-content {
    background: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    animation: localbuzz-modal-fadeIn 0.3s ease;
}

@keyframes localbuzz-modal-fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

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

.localbuzz-modal-title, .modal-header h2 {
    margin: 0;
    color: #26343d;
    font-size: 20px;
}

.localbuzz-modal-close, .modal-header .close {
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #999;
    background: none;
    border: none;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.localbuzz-modal-close:hover, .modal-header .close:hover {
    color: #26343d;
    background: #f8f9fa;
}

.localbuzz-modal-body, .modal-body {
    padding: 30px;
}

.localbuzz-modal-footer, .modal-footer {
    padding: 20px 30px;
    border-top: 1px solid #e1e1e1;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

/* Table Styles */
.localbuzz-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.localbuzz-table th,
.localbuzz-table td {
    padding: 15px 20px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

.localbuzz-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #26343d;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.localbuzz-table tbody tr:hover {
    background: #f8f9fa;
}

.localbuzz-table tbody tr:last-child td {
    border-bottom: none;
}

/* Utility Classes */
.localbuzz-text-center { text-align: center; }
.localbuzz-text-left { text-align: left; }
.localbuzz-text-right { text-align: right; }

.localbuzz-mb-0 { margin-bottom: 0; }
.localbuzz-mb-1 { margin-bottom: 10px; }
.localbuzz-mb-2 { margin-bottom: 20px; }
.localbuzz-mb-3 { margin-bottom: 30px; }
.localbuzz-mb-4 { margin-bottom: 40px; }

.localbuzz-mt-0 { margin-top: 0; }
.localbuzz-mt-1 { margin-top: 10px; }
.localbuzz-mt-2 { margin-top: 20px; }
.localbuzz-mt-3 { margin-top: 30px; }
.localbuzz-mt-4 { margin-top: 40px; }

.localbuzz-hidden { display: none; }
.localbuzz-visible { display: block; }

/* Loading States */
.localbuzz-loading {
    opacity: 0.7;
    pointer-events: none;
}

.localbuzz-loading .localbuzz-spinner {
    display: inline-block;
}

/* Responsive Design */
@media (max-width: 768px) {
    .localbuzz-container {
        padding: 15px;
    }
    
    .localbuzz-grid-2,
    .localbuzz-grid-3,
    .localbuzz-grid-4 {
        grid-template-columns: 1fr;
    }
    
    .localbuzz-modal-content {
        width: 95%;
        margin: 2% auto;
    }
    
    .localbuzz-modal-header,
    .localbuzz-modal-body,
    .localbuzz-modal-footer {
        padding: 20px;
    }
    
    .localbuzz-form-group {
        grid-template-columns: 1fr;
    }
    
    .localbuzz-table {
        font-size: 14px;
    }
    
    .localbuzz-table th,
    .localbuzz-table td {
        padding: 10px 15px;
    }
}

@media (max-width: 480px) {
    .localbuzz-btn {
        width: 100%;
        justify-content: center;
    }
    
    .localbuzz-modal-footer {
        flex-direction: column;
    }
    
    .localbuzz-modal-footer .localbuzz-btn {
        margin: 0;
    }
}

/* Generic Button Classes for Marketplace */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    line-height: 1;
}

.btn:hover {
    transform: translateY(-1px);
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #fb5f47 0%, #feab2d 100%);
    color: white;
}

.btn-primary:hover {
    box-shadow: 0 4px 15px rgba(251, 95, 71, 0.3);
    color: white;
}

.btn-secondary {
    background: #26343d;
    color: white;
}

.btn-secondary:hover {
    background: #1a2429;
    color: white;
}

.btn-info {
    background: #feab2d;
    color: white;
}

.btn-info:hover {
    background: #fb9d1a;
    color: white;
}

/* ADDED: Payment Flow & Loading States */
.btn.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.btn.loading .btn-text {
    opacity: 0.5;
}

.btn .spinner {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.btn.loading .spinner {
    display: block;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Payment Section Styles */
.payment-section {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    border: 2px solid #e9ecef;
    margin: 20px 0;
}

.payment-header h3 {
    margin: 0 0 10px 0;
    color: #26343d;
    font-size: 18px;
}

.payment-header p {
    margin: 0 0 20px 0;
    color: #666;
}

.payment-summary {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    border: 1px solid #e1e1e1;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding: 8px 0;
}

.summary-row:last-child {
    margin-bottom: 0;
}

.total-row {
    border-top: 2px solid #e1e1e1;
    padding-top: 15px;
    margin-top: 15px;
}

.payment-methods h4 {
    margin: 20px 0 15px 0;
    color: #26343d;
}

.payment-options {
    display: grid;
    gap: 10px;
}

.payment-option {
    display: flex;
    align-items: center;
    padding: 15px;
    background: white;
    border: 2px solid #e1e1e1;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.payment-option:hover {
    border-color: #fb5f47;
    background: #f8f9fa;
}

.payment-option input[type="radio"] {
    margin: 0 15px 0 0;
}

.payment-icon {
    font-size: 20px;
    margin-right: 10px;
}

.payment-note {
    background: #fff0e6;
    border-left: 4px solid #feab2d;
    padding: 15px;
    margin: 20px 0;
    border-radius: 0 8px 8px 0;
}

.payment-note p {
    margin: 0;
    color: #cc6600;
    font-size: 14px;
}

/* Form updates for better payment integration */
.form-row-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

/* Payment updates for better Stripe integration */
.form-row-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

/* Stripe Card Element Styles */
.stripe-card-section {
    margin: 20px 0;
    padding: 20px;
    background: white;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
}

.stripe-card-section h4 {
    margin: 0 0 15px 0;
    color: #26343d;
}

.stripe-card-element {
    padding: 15px;
    border: 2px solid #e1e1e1;
    border-radius: 8px;
    background: white;
    transition: border-color 0.3s ease;
}

.stripe-card-element:focus-within {
    border-color: #fb5f47;
    box-shadow: 0 0 0 3px rgba(251, 95, 71, 0.1);
}

.stripe-card-errors {
    margin-top: 10px;
    color: #dc3545;
    font-size: 14px;
}

/* Payment method selection updates */
.payment-option input[type="radio"] {
    margin: 0 15px 0 0;
    transform: scale(1.2);
}

.payment-option:hover {
    border-color: #fb5f47;
    background: #f8f9fa;
    transform: translateY(-1px);
}

.payment-option input[type="radio"]:checked + .payment-icon + span {
    font-weight: bold;
    color: #fb5f47;
}

/* Show/hide Stripe card section based on payment method */
#stripe-card-section {
    display: block;
}

body.payment-method-test #stripe-card-section,
body.payment-method-credits #stripe-card-section {
    display: none;
}

@media (max-width: 768px) {
    .form-row-group {
        grid-template-columns: 1fr;
    }
    
    .payment-options {
        grid-template-columns: 1fr;
    }
    
    .stripe-card-section {
        padding: 15px;
    }
}

/* Frontend Notice Styles for Admin Script Integration */
#localbuzz-admin-notices {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    width: 300px;
}

.localbuzz-admin-notice {
    background: #fff;
    border-left: 4px solid #00a32a;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-bottom: 10px;
    padding: 15px 20px;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.4;
    color: #26343d;
    position: relative;
    animation: slideInRight 0.3s ease;
}

.localbuzz-admin-notice-success {
    border-left-color: #00a32a;
}

.localbuzz-admin-notice-error {
    border-left-color: #d63638;
    background: #fff;
}

.localbuzz-admin-notice-warning {
    border-left-color: #feab2d;
}

.localbuzz-admin-notice-info {
    border-left-color: #fb5f47;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive notices for mobile */
@media (max-width: 768px) {
    #localbuzz-admin-notices {
        width: calc(100% - 40px);
        left: 20px;
        right: 20px;
        top: 10px;
    }
}
