/**
 * Venue Management System - Frontend Styles
 * Complete styling for forms, dashboard, and all components
 */

/* ===================================
   RESET & BASE STYLES
   =================================== */
.vms-form-container *,
.vms-dashboard * {
    box-sizing: border-box;
}

/* ===================================
   FORM CONTAINER
   =================================== */
.vms-form-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.vms-form-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 3px solid #0073aa;
}

.vms-form-header h2 {
    font-size: 32px;
    font-weight: 600;
    color: #23282d;
    margin: 0 0 10px 0;
}

.vms-form-description {
    font-size: 16px;
    color: #555;
    margin: 0;
}

/* ===================================
   MESSAGES
   =================================== */
.vms-message {
    padding: 15px 20px;
    margin-bottom: 30px;
    border-radius: 4px;
    border-left: 4px solid;
    font-size: 15px;
    line-height: 1.5;
}

.vms-message-success {
    background-color: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.vms-message-error {
    background-color: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

.vms-message-info {
    background-color: #d1ecf1;
    border-color: #17a2b8;
    color: #0c5460;
}

/* ===================================
   FORM ELEMENTS
   =================================== */
.vms-form {
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.vms-form-group {
    margin-bottom: 35px;
}

.vms-label {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #23282d;
    margin-bottom: 8px;
}

.vms-required {
    color: #dc3545;
    font-weight: bold;
}

.vms-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
    font-style: italic;
}

.vms-input {
    width: 100%;
    padding: 12px 15px;
    font-size: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.vms-input:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.vms-textarea {
    width: 100%;
    padding: 12px 15px;
    font-size: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    min-height: 120px;
    resize: vertical;
    font-family: inherit;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.vms-textarea:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

/* WordPress Editor Styling */
.wp-editor-wrap {
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

/* ===================================
   REPEATER FIELDS
   =================================== */
.vms-repeater-container {
    margin-bottom: 15px;
}

.vms-repeater-item {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    align-items: center;
}

.vms-repeater-item input {
    flex: 1;
}

.vms-btn-add {
    display: inline-block;
    padding: 10px 20px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s;
}

.vms-btn-add:hover {
    background: #005a87;
}

.vms-btn-remove {
    padding: 10px 15px;
    background: #dc3545;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.3s;
}

.vms-btn-remove:hover {
    background: #c82333;
}

/* ===================================
   GOOGLE MAPS
   =================================== */
.vms-google-map {
    width: 100%;
    height: 400px;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.vms-map-search {
    margin-bottom: 10px;
}

.vms-map-instructions {
    background: #f8f9fa;
    border-left: 4px solid #0073aa;
    padding: 12px 15px;
    margin-bottom: 15px;
    border-radius: 4px;
}

.vms-map-instructions p {
    margin: 0;
    font-size: 14px;
    color: #555;
}

/* ===================================
   GALLERY UPLOAD
   =================================== */
.vms-gallery-section {
    margin-top: 20px;
}

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

.vms-gallery-count {
    font-size: 14px;
    color: #666;
}

#venue-gallery-upload-btn {
    padding: 12px 24px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s;
}

#venue-gallery-upload-btn:hover {
    background: #005a87;
}

#venue-gallery-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 20px;
    min-height: 100px;
}

.gallery-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #ddd;
    transition: transform 0.3s, box-shadow 0.3s;
}

.gallery-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.remove-gallery-image {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 28px;
    height: 28px;
    background: rgba(220, 53, 69, 0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.remove-gallery-image:hover {
    background: #dc3545;
}

.remove-gallery-image .dashicons {
    color: #fff;
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.vms-no-images {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-style: italic;
    background: #f8f9fa;
    border: 2px dashed #ddd;
    border-radius: 8px;
}

/* ===================================
   HOST IMAGE UPLOAD
   =================================== */
.vms-image-upload-section {
    margin-top: 15px;
}

#venue-host-image-upload-btn {
    padding: 10px 20px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.3s;
}

#venue-host-image-upload-btn:hover {
    background: #005a87;
}

#venue-host-image-preview {
    margin-top: 15px;
    display: none;
}

#venue-host-image-preview img {
    max-width: 200px;
    height: auto;
    border-radius: 8px;
    border: 2px solid #ddd;
    margin-bottom: 10px;
}

/* ===================================
   SUBMIT BUTTON
   =================================== */
.vms-submit-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #eee;
    text-align: center;
}

.vms-submit-btn {
    padding: 15px 50px;
    background: #28a745;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
}

.vms-submit-btn:hover {
    background: #218838;
    transform: translateY(-2px);
}

.vms-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* ===================================
   MY VENUES DASHBOARD
   =================================== */
.vms-dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.vms-dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 3px solid #0073aa;
}

.vms-dashboard-header h2 {
    font-size: 28px;
    color: #23282d;
    margin: 0;
}

.vms-add-new-btn {
    padding: 12px 24px;
    background: #0073aa;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: background 0.3s;
}

.vms-add-new-btn:hover {
    background: #005a87;
}

/* ===================================
   VENUE CARDS
   =================================== */
.vms-venues-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.vms-venue-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

.vms-venue-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.vms-venue-thumbnail {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: #f5f5f5;
}

.vms-venue-content {
    padding: 20px;
}

.vms-venue-title {
    font-size: 20px;
    font-weight: 600;
    color: #23282d;
    margin: 0 0 10px 0;
    line-height: 1.3;
}

.vms-venue-status {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 15px;
}

.vms-status-pending {
    background: #fff3cd;
    color: #856404;
}

.vms-status-published {
    background: #d4edda;
    color: #155724;
}

.vms-status-draft {
    background: #f8d7da;
    color: #721c24;
}

.vms-venue-meta {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
}

.vms-venue-excerpt {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
    margin-bottom: 20px;
}

.vms-venue-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.vms-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
}

.vms-btn-primary {
    background: #0073aa;
    color: #fff;
}

.vms-btn-primary:hover {
    background: #005a87;
}

.vms-btn-secondary {
    background: #6c757d;
    color: #fff;
}

.vms-btn-secondary:hover {
    background: #5a6268;
}

.vms-btn-danger {
    background: #dc3545;
    color: #fff;
}

.vms-btn-danger:hover {
    background: #c82333;
}

.vms-btn-success {
    background: #28a745;
    color: #fff;
}

.vms-btn-success:hover {
    background: #218838;
}

/* ===================================
   VENUE LIST VIEW (TABLE)
   =================================== */
.vms-venues-list {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.vms-venue-item {
    display: grid;
    grid-template-columns: 100px 1fr auto;
    gap: 20px;
    padding: 20px;
    border-bottom: 1px solid #eee;
    align-items: center;
    transition: background 0.3s;
}

.vms-venue-item:hover {
    background: #f8f9fa;
}

.vms-venue-item:last-child {
    border-bottom: none;
}

.vms-venue-thumb {
    width: 100px;
    height: 100px;
    border-radius: 8px;
    object-fit: cover;
    background: #f5f5f5;
}

.vms-venue-info h3 {
    font-size: 18px;
    margin: 0 0 8px 0;
    color: #23282d;
}

.vms-venue-info p {
    margin: 5px 0;
    font-size: 14px;
    color: #666;
}

/* ===================================
   REJECTION MESSAGE
   =================================== */
.vms-rejection-message {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 15px;
    margin-top: 15px;
    border-radius: 4px;
}

.vms-rejection-message strong {
    display: block;
    margin-bottom: 8px;
    color: #856404;
}

.vms-rejection-message p {
    margin: 0;
    color: #856404;
    font-size: 14px;
    line-height: 1.5;
}

/* ===================================
   NO VENUES STATE
   =================================== */
.vms-no-venues {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.vms-no-venues-icon {
    font-size: 60px;
    margin-bottom: 20px;
    opacity: 0.3;
}

/* ===================================
   LOADING STATE
   =================================== */
.vms-loading {
    text-align: center;
    padding: 40px;
}

.vms-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0073aa;
    border-radius: 50%;
    animation: vms-spin 1s linear infinite;
}

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

/* ===================================
   ADMIN APPROVAL PAGE
   =================================== */
.vms-admin-container {
    max-width: 1400px;
    margin: 20px auto;
}

.vms-admin-header {
    background: #fff;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.vms-admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.vms-stat-card {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    text-align: center;
}

.vms-stat-number {
    font-size: 32px;
    font-weight: bold;
    color: #0073aa;
    margin-bottom: 5px;
}

.vms-stat-label {
    font-size: 14px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.vms-admin-table {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.vms-admin-table table {
    width: 100%;
    border-collapse: collapse;
}

.vms-admin-table th {
    background: #f8f9fa;
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #23282d;
    border-bottom: 2px solid #dee2e6;
}

.vms-admin-table td {
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.vms-admin-table tr:hover {
    background: #f8f9fa;
}

.vms-admin-actions {
    display: flex;
    gap: 8px;
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */
@media (max-width: 768px) {
    .vms-form {
        padding: 25px;
    }
    
    .vms-form-header h2 {
        font-size: 24px;
    }
    
    .vms-dashboard-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .vms-venues-grid {
        grid-template-columns: 1fr;
    }
    
    .vms-venue-item {
        grid-template-columns: 80px 1fr;
        gap: 15px;
    }
    
    .vms-venue-actions {
        grid-column: 1 / -1;
    }
    
    .vms-repeater-item {
        flex-direction: column;
    }
    
    .vms-repeater-item input {
        width: 100%;
    }
    
    #venue-gallery-container {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
    }
    
    .vms-admin-stats {
        grid-template-columns: 1fr;
    }
    
    .vms-admin-table {
        overflow-x: auto;
    }
}

@media (max-width: 480px) {
    .vms-form-container {
        padding: 20px 10px;
    }
    
    .vms-form {
        padding: 20px;
    }
    
    .vms-submit-btn {
        width: 100%;
        padding: 12px;
    }
    
    #venue-gallery-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===================================
   PRINT STYLES
   =================================== */
@media print {
    .vms-btn,
    .vms-venue-actions,
    .vms-admin-actions,
    .vms-add-new-btn {
        display: none;
    }
    
    .vms-venue-card,
    .vms-venue-item {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* ===================================
   ACCESSIBILITY
   =================================== */
.vms-input:focus,
.vms-textarea:focus,
.vms-btn:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

.vms-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ===================================
   ANIMATIONS
   =================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.vms-venue-card,
.vms-venue-item {
    animation: fadeIn 0.4s ease-out;
}

/* ===================================
   UTILITY CLASSES
   =================================== */
.vms-text-center {
    text-align: center;
}

.vms-text-right {
    text-align: right;
}

.vms-mt-10 {
    margin-top: 10px;
}

.vms-mt-20 {
    margin-top: 20px;
}

.vms-mb-10 {
    margin-bottom: 10px;
}

.vms-mb-20 {
    margin-bottom: 20px;
}

.vms-hidden {
    display: none !important;
}

.vms-visible {
    display: block !important;
}