/**
 * HVAC Event Management Styles
 * Styles for The Events Calendar Community event creation/editing form
 */

/* Main page wrapper - removed duplicate, using .hvac-event-manage-wrapper instead */
.hvac-event-manage-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
    box-sizing: border-box;
}

/* Navigation header from HVAC plugin */
.hvac-event-manage-wrapper .hvac-dashboard-header {
    background: #ffffff;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    width: 100%;
    box-sizing: border-box;
}

.hvac-event-manage-wrapper .hvac-dashboard-header h1.entry-title {
    margin: 0;
    font-size: 2rem;
    color: #333333;
    font-weight: 600;
    line-height: 1.2;
}

/* Main content container from The Events Calendar */
.hvac-event-manage-wrapper .tribe-community-events-content,
.hvac-event-manage-wrapper #tribe-community-events {
    background: #ffffff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    width: 100%;
    box-sizing: border-box;
}

/* Remove default tribe styles that conflict */
.hvac-event-manage-wrapper .tribe-community-events {
    padding: 0;
    margin: 0;
    background: transparent;
    max-width: none;
    width: 100%;
}

/* Form sections */
.hvac-event-manage-wrapper .tribe-section {
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: #f9f9f9;
    border-radius: 4px;
    border: 1px solid #e5e7eb;
}

/* Form labels */
.hvac-event-manage-wrapper .tribe-events-community-details label,
.hvac-event-manage-wrapper .tribe-section label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333333;
    font-size: 0.875rem;
}

/* Input fields */
.hvac-event-manage-wrapper .tribe-events-community-details input[type="text"],
.hvac-event-manage-wrapper .tribe-events-community-details input[type="email"],
.hvac-event-manage-wrapper .tribe-events-community-details input[type="url"],
.hvac-event-manage-wrapper .tribe-events-community-details input[type="number"],
.hvac-event-manage-wrapper .tribe-events-community-details input[type="date"],
.hvac-event-manage-wrapper .tribe-events-community-details input[type="time"],
.hvac-event-manage-wrapper .tribe-events-community-details select,
.hvac-event-manage-wrapper .tribe-events-community-details textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #dddddd;
    border-radius: 4px;
    font-size: 0.875rem;
    line-height: 1.5;
    transition: all 0.2s ease;
    background: #ffffff;
    box-sizing: border-box;
}

/* Focus states */
.tribe-events-community-details input:focus,
.tribe-events-community-details select:focus,
.tribe-events-community-details textarea:focus {
    outline: none;
    border-color: var(--hvac-primary, #0073aa);
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

/* Event title field - make it stand out */
#EventTitle,
input[name="post_title"] {
    font-size: 1.125rem !important;
    font-weight: 500;
    padding: var(--hvac-spacing-3, 0.75rem) !important;
}

/* Form sections headings */
.tribe-section h3,
.tribe-events-community-section-title {
    margin: 0 0 var(--hvac-spacing-md, 1rem);
    font-size: 1.25rem;
    color: var(--hvac-text, #333333);
}

/* Submit button */
.tribe-events-community-footer {
    margin-top: var(--hvac-spacing-xl, 2rem);
    padding-top: var(--hvac-spacing-lg, 1.5rem);
    border-top: 1px solid var(--hvac-border, #e5e7eb);
}

.tribe-events-community-footer input[type="submit"],
.tribe-button.tribe-button-primary {
    background: var(--hvac-primary, #0073aa);
    color: #ffffff;
    padding: var(--hvac-spacing-3, 0.75rem) var(--hvac-spacing-5, 1.5rem);
    border: none;
    border-radius: var(--hvac-radius-sm, 4px);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-block;
    text-decoration: none;
}

.tribe-events-community-footer input[type="submit"]:hover,
.tribe-button.tribe-button-primary:hover {
    background: var(--hvac-primary-dark, #005a87);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Secondary buttons */
.tribe-button-secondary {
    background: #f3f4f6;
    color: var(--hvac-text, #333333);
    padding: var(--hvac-spacing-3, 0.75rem) var(--hvac-spacing-5, 1.5rem);
    border: 1px solid var(--hvac-border, #e5e7eb);
    border-radius: var(--hvac-radius-sm, 4px);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-block;
    text-decoration: none;
    margin-left: var(--hvac-spacing-sm, 0.75rem);
}

.tribe-button-secondary:hover {
    background: #e5e7eb;
    border-color: #d1d5db;
}

/* Error and success messages */
.tribe-events-community-notice,
.tribe-events-notices {
    padding: var(--hvac-spacing-md, 1rem);
    margin-bottom: var(--hvac-spacing-lg, 1.5rem);
    border-radius: var(--hvac-radius-sm, 6px);
    border-left: 4px solid;
}

.tribe-events-community-notice.tribe-events-community-error,
.tribe-events-notices.tribe-events-notices-error {
    background: #fef2f2;
    border-color: #ef4444;
    color: #991b1b;
}

.tribe-events-community-notice.tribe-events-community-success,
.tribe-events-notices.tribe-events-notices-success {
    background: #f0fdf4;
    border-color: #10b981;
    color: #166534;
}

/* Date picker adjustments */
.ui-datepicker {
    font-size: 0.875rem;
}

.ui-datepicker-trigger {
    margin-left: var(--hvac-spacing-xs, 0.5rem);
    cursor: pointer;
}

/* TinyMCE editor */
.wp-editor-wrap {
    border: 1px solid var(--hvac-border, #dddddd);
    border-radius: var(--hvac-radius-sm, 4px);
    overflow: hidden;
}

.wp-editor-area {
    width: 100% !important;
    min-height: 300px;
    font-family: inherit;
}

/* Required field indicators */
.required {
    color: #ef4444;
    font-weight: bold;
}

/* Override theme constraints to ensure proper layout */
.hvac-event-manage-wrapper {
    /* Force full width within container */
    width: 100% !important;
    max-width: 1200px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding: 20px !important;
    box-sizing: border-box !important;
}

/* Ensure the ast-container doesn't constrain our layout */
.ast-container .hvac-event-manage-wrapper {
    padding-left: 20px !important;
    padding-right: 20px !important;
}

/* Fix navigation buttons */
.hvac-event-manage-wrapper .hvac-dashboard-nav .ast-button {
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-block;
    line-height: 1;
    border: 1px solid transparent;
}

.hvac-event-manage-wrapper .hvac-dashboard-nav .ast-button-secondary {
    background: #f3f4f6;
    color: #374151;
    border-color: #e5e7eb;
}

.hvac-event-manage-wrapper .hvac-dashboard-nav .ast-button-secondary:hover {
    background: #e5e7eb;
    color: #1f2937;
    border-color: #d1d5db;
    transform: translateY(-1px);
}

/* Hide any duplicate page titles from theme */
body.page-id-5344 .entry-header {
    display: none !important;
}

/* Ensure tribe forms don't have extra spacing */
.hvac-event-manage-wrapper form.tribe-events-community-form {
    margin: 0;
    padding: 0;
}

/* Fix any theme-added padding/margins */
body.page-id-5344 #primary {
    padding: 0;
}

body.page-id-5344 .site-content {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hvac-event-manage-wrapper {
        padding: 1rem !important;
    }
    
    .hvac-event-manage-wrapper .hvac-dashboard-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .hvac-event-manage-wrapper .hvac-dashboard-nav {
        width: 100%;
        margin-top: 1rem;
    }
    
    .hvac-event-manage-wrapper .hvac-dashboard-nav .ast-button {
        display: block;
        width: 100%;
        margin-bottom: 0.75rem;
        text-align: center;
    }
    
    .hvac-event-manage-wrapper .tribe-community-events-content,
    .hvac-event-manage-wrapper #tribe-community-events {
        padding: 1rem;
    }
    
    .hvac-event-manage-wrapper .tribe-events-community-footer {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .hvac-event-manage-wrapper .tribe-button-secondary {
        margin-left: 0;
        width: 100%;
        text-align: center;
    }
}