/**
 * Serenity Booking - Services Page Styles
 * Production-Ready for ThemeForest
 * Path: admin/css/services-page.css
 */

/* ========== PAGE WRAPPER ========== */
.wrap.serenity-services-page {
    background: #f9fafb;
    margin: -20px -20px 0 0;
    padding: 30px;
    min-height: 100vh;
}

/* ========== PAGE HEADER ========== */
.serenity-services-page .serenity-page-header {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.serenity-services-page .serenity-page-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #111827;
}

.serenity-services-page .serenity-page-title i { color: #a855f7; }

.serenity-services-page .serenity-page-description {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
}

/* ========== BUTTONS ========== */
.serenity-services-page .serenity-btn-primary {
    background: #3b82f6;
    color: white !important;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}
.serenity-services-page .serenity-btn-primary:hover {
    background: #2563eb;
    color: white !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59,130,246,0.3);
}

.serenity-services-page .serenity-btn-secondary {
    flex: 1;
    background: #f3f4f6;
    color: #374151 !important;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
    border: 1px solid #e5e7eb;
}
.serenity-services-page .serenity-btn-secondary:hover { background: #e5e7eb; color: #111827 !important; }

.serenity-services-page .serenity-btn-danger {
    background: #fee2e2;
    color: #dc2626 !important;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    border: 1px solid #fecaca;
}
.serenity-services-page .serenity-btn-danger:hover { background: #fca5a5; color: white !important; }

/* ========== EMPTY STATE ========== */
.serenity-services-page .serenity-empty-state {
    background: white;
    border-radius: 12px;
    padding: 80px 40px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.serenity-services-page .serenity-empty-icon { font-size: 64px; color: #d1d5db; margin-bottom: 20px; }
.serenity-services-page .serenity-empty-state h2 { font-size: 24px; font-weight: 600; color: #111827; margin: 0 0 12px 0; }
.serenity-services-page .serenity-empty-state p { color: #6b7280; font-size: 16px; margin: 0 0 30px 0; }

/* ========== CATEGORY SECTION ========== */
.serenity-category-section { margin-bottom: 40px; }

.serenity-category-title {
    font-size: 20px;
    font-weight: 700;
    color: #374151;
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 10px;
}
.serenity-category-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 22px;
    background: linear-gradient(135deg, #a855f7, #ec4899);
    border-radius: 2px;
}

/* ========== SERVICES GRID ========== */
.serenity-services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

/* ========== SERVICE CARD ========== */
.serenity-service-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: all 0.2s;
    border: 2px solid transparent;
}
.serenity-service-card:hover {
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    transform: translateY(-2px);
    border-color: #a855f7;
}

.serenity-service-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(135deg, #faf5ff, #fdf2f8);
}

.serenity-service-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #a855f7, #ec4899);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: white;
    flex-shrink: 0;
}

.serenity-service-info { flex: 1; min-width: 0; }

.serenity-service-info h3 {
    margin: 0 0 6px 0;
    font-size: 17px;
    font-weight: 700;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.serenity-service-status {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}
.serenity-service-status.status-active { background: #d1fae5; color: #065f46; }
.serenity-service-status.status-draft  { background: #f3f4f6; color: #6b7280; }

.serenity-service-meta {
    padding: 14px 24px;
    display: flex;
    gap: 20px;
    background: #fafafa;
    border-bottom: 1px solid #f3f4f6;
}
.serenity-service-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}
.serenity-service-meta i { color: #a855f7; font-size: 13px; }

.serenity-service-footer {
    padding: 16px 24px;
    display: flex;
    gap: 10px;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1200px) {
    .serenity-services-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
}
@media (max-width: 782px) {
    .wrap.serenity-services-page { padding: 16px; }
    .serenity-services-page .serenity-page-header { flex-direction: column; align-items: flex-start; gap: 16px; }
    .serenity-services-grid { grid-template-columns: 1fr; }
}

/* Hide WP footer on services page */
.wrap.serenity-services-page #wpfooter { display: none !important; }

/* ── Legacy CPT meta box field styles (migrated from inline) ── */
.service-field { margin-bottom: 16px; }
.service-field label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 13px; color: #374151; }
.service-field input,
.service-field select { width: 100%; padding: 8px 10px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 14px; }
.service-field small { display: block; margin-top: 4px; color: #6b7280; font-size: 12px; }

/* ── Legacy hours table (migrated from inline) ── */
.serenity-hours-table { width: 100%; border-collapse: collapse; }
.serenity-hours-table th,
.serenity-hours-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #e5e7eb; font-size: 14px; }
.serenity-hours-table th { font-weight: 600; background: #f9fafb; }
.serenity-hours-table input[type="time"] { width: 130px; padding: 6px 8px; border: 1px solid #d1d5db; border-radius: 6px; }

/* ── Service edit/add page layout (migrated from inline) ── */
.serenity-edit-service { max-width: 1200px; margin: 20px auto; }
.serenity-edit-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; }
.serenity-edit-title { font-size: 28px; font-weight: 600; margin: 0 0 10px 0; }
.serenity-back-link { color: #667eea; text-decoration: none; font-size: 14px; }
.serenity-btn-save { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; border: none; padding: 12px 24px; border-radius: 8px; cursor: pointer; font-weight: 600; }
.serenity-edit-card { background: white; border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.1); margin-bottom: 20px; }
.serenity-card-header-edit { padding: 20px 30px; border-bottom: 1px solid #e5e7eb; }
.serenity-card-header-edit h2 { margin: 0; font-size: 20px; font-weight: 600; }
.serenity-card-body-edit { padding: 30px; }
.serenity-form-group { margin-bottom: 20px; }
.serenity-form-row { display: flex; gap: 15px; margin-bottom: 20px; }
.serenity-form-group label { display: block; font-weight: 600; margin-bottom: 8px; color: #374151; }
.serenity-input-field { width: 100%; padding: 12px; border: 2px solid #e5e7eb; border-radius: 8px; font-size: 14px; box-sizing: border-box; }
.serenity-input-field:focus { outline: none; border-color: #667eea; }
.serenity-form-footer { display: flex; gap: 15px; justify-content: flex-end; padding: 20px 0; }
.serenity-btn-cancel { padding: 12px 24px; border: 2px solid #e5e7eb; border-radius: 8px; text-decoration: none; color: #374151; font-weight: 600; }
.serenity-btn-save-bottom { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; border: none; padding: 12px 24px; border-radius: 8px; cursor: pointer; font-weight: 600; }
/* Category new input hidden by default */
#service_category_new { display: none; margin-top: 8px; }
