/* Modern Calendar Widget Styles */
.wr-modern-calendar-wrapper {
    width: 100%;
    margin: 0 auto;
    position: relative;
}

.wr-modern-calendar-wrapper .wr-asideholder {
    width: 100%;
    margin: 0;
}

.modern-calendar-widget {
    background: none;
    border: none;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
    opacity: 1;
    transform: translateY(0);
    transition: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    min-width: 100%;
}

.modern-calendar-widget.calendar-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Collapsed Calendar Field Styles */
.calendar-field-collapsed {
    border: 1px solid #e1e1e1;
    border-radius: 10px;
    padding: 15px;
    background: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
    position: relative;
}

.calendar-field-collapsed:hover {
    border-color: #667eea;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.1);
}

.calendar-field-header {
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.calendar-field-content {

}

.calendar-body {
    display: block !important;
    position: relative;
    min-height: 350px;
    width: 100% !important;
    overflow: hidden;
}

.calendar-month {
    width: 100% !important;
    padding: 20px;
    position: relative;
    box-sizing: border-box !important;
}

.calendar-month:first-child {
    border-right: none;
}

/* Month Title - Flexbox Layout */
.month-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
    font-size: 16px;
    color: #333;
    margin-bottom: 15px;
    min-height: 40px;
    position: relative;
}

/* Month name takes center space */
.month-title .month-name {
    flex: 1;
    text-align: center;
    padding: 0 10px;
}

/* Month Navigation Buttons */
.month-nav-btn {
    background: #22c55e37;
    border: 1px solid #22c55e;
    color: #22c55e;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.month-nav-btn:hover {
    background: #22c55e67;
    border-color: #5ebc80;
    transform: scale(1.05);
}

/* Hide buttons with visibility: hidden but keep their space */
.month-nav-btn[style*="visibility: hidden"] {
    visibility: hidden;
}

/* BACKWARD COMPATIBILITY: Support both old and new class names */

/* New structure (corrected) - main styles */
.days-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    margin-bottom: 1px;
    background: #f8f9fa;
    padding: 8px 0;
    border-radius: 4px 4px 0 0;
}

.day-name {
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    padding: 6px 2px;
    background: transparent;
    margin: -5px;
}

/* Legacy support (old structure) - keep existing styles */
.weekdays,
.days-header {
    /* Use the same styles for both */
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    margin-bottom: 1px;
    background: #f8f9fa;
    padding: 8px 0;
    border-radius: 4px 4px 0 0;
}

.weekday,
.day-name {
    /* Use the same styles for both */
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    padding: 6px 2px;
    background: transparent;
    margin: -5px;
}

.days-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
}

.day-tile {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #F7F7F8;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.day-tile:hover {
    background: #e8f4fd;
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.day-tile.selected {
    background: #22c55e;
    color: white;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.day-tile.selected:hover {
    background: #16a34a;
}

.day-tile.in-range {
    background: #22c55e;
    color: white;
}

.day-tile.range-start,
.day-tile.range-end {
    background: #16a34a;
    color: white;
    font-weight: 600;
}

.day-tile.other-month {
    color: #ccc;
    background: #f5f5f5;
}

.day-tile.other-month:hover {
    background: #efefef;
}

.day-tile.disabled {
    color: #ddd;
    background: #f9f9f9;
    cursor: not-allowed;
}

.day-tile.disabled:hover {
    transform: none;
    box-shadow: none;
}

.day-tile.today {
    border: 2px solid #22c55e;
    font-weight: 700;
}

.day-tile.today.selected {
    border: 2px solid #fff;
}

.selected-dates-display {
    padding: 30px 20px 20px 20px;
    background: #f8fafc;
    border-top: 1px solid #e5e5e5;
    display: flex;
    flex-wrap: wrap;
    justify-content: left;
    align-items: center;
    margin-top: -10px;
    border-radius: 0px 0px 12px 12px;
    width: 100%;
}
.calendar-dates-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: left;
    align-items: center;
    width: 100%;
    flex: 1;
}

.selected-dates-info {
    flex: 1;
    display: grid;
    justify-content: left;
}

.dates-count {
    color: #374151;
    font-size: 14px;
    align-items: center;
    font: 600 15px / 20px Inter, sans-serif;
    margin-top: 4px;
}

.selected-dates-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Confirm Button */
.calendar-confirm-btn {
    background: #5cd434;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    margin-left: 10px;
}

.calendar-confirm-btn:hover {
    background: #a2eb8a;
    color: #b7d8ab;
}

.calendar-confirm-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Month sliding animations */
.calendar-month {
    transform: translateX(0);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.calendar-month.sliding-left {
    transform: translateX(-100%);
}

.calendar-month.sliding-right {
    transform: translateX(100%);
}

.calendar-month.sliding-in-from-right {
    transform: translateX(100%);
    animation: slideInFromRight 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.calendar-month.sliding-in-from-left {
    transform: translateX(-100%);
    animation: slideInFromLeft 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes slideInFromRight {
    to {
        transform: translateX(0);
    }
}

@keyframes slideInFromLeft {
    to {
        transform: translateX(0);
    }
}

/* Calendar collapse/expand animation */
.calendar-collapsing {
    animation: collapseCalendar 0.5s ease-out forwards;
}

.calendar-expanding {
    animation: expandCalendar 0.5s ease-out forwards;
}

@keyframes collapseCalendar {
    from {
        max-height: 500px;
        opacity: 1;
    }
    to {
        max-height: 80px;
        opacity: 0;
    }
}

@keyframes expandCalendar {
    from {
        max-height: 80px;
        opacity: 0;
    }
    to {
        max-height: 500px;
        opacity: 1;
    }
}

.selected-date-tag {
    background: #22c55e;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    position: relative;
    animation: fadeInTag 0.3s ease;
}

@keyframes fadeInTag {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.selected-date-tag .remove-date {
    margin-left: 6px;
    cursor: pointer;
    font-weight: bold;
    opacity: 0.8;
}

.selected-date-tag .remove-date:hover {
    opacity: 1;
}

/* Animation for theme integration */
.wr-modern-calendar-wrapper {
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(0);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Calendar Field Edit Hint */
.calendar-field-edit {
    font-size: 12px;
    color: #999;
    font-style: italic;
    margin-top: 5px;
}

.calendar-field-collapsed:hover .calendar-field-edit {
    color: #667eea;
}

/* Form Step Animation */
.form-step-hidden {
    opacity: 0;
    transform: translateY(0);
    transition: all 0.5s ease;
}

.form-step-visible {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.5s ease;
}

/* Calendar collapsed state */
.wr-modern-calendar-wrapper.calendar-collapsed .modern-calendar-widget {
    display: none;
}

.wr-modern-calendar-wrapper.calendar-collapsed .selected-dates-display {
    display: none;
}

.wr-modern-calendar-wrapper.calendar-collapsed .calendar-field-collapsed {
    display: block;
}

/* Make collapsed field look like other form fields */
.calendar-field-collapsed {
    background: #fff;
    border-radius: 10px;
    padding: 0 20px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
    position: relative;
}

.calendar-field-collapsed:hover {
    border-color: #DDDDDD;
    box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.08);
}

.calendar-field-collapsed:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    outline: none;
}

.calendar-field-main {
    display: flex;
    align-items: center;
    flex: 1;
    gap: 12px;
}

.calendar-field-icon {
    color: #999;
    font-size: 16px;
    flex-shrink: 0;
}

.calendar-field-text {
    flex: 1;
    display: flex;
   flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    flex-direction: row;
}

.calendar-field-label {
    font-size: 13px;
    color: #999;
    font-weight: 400; 
    display: flex;
     align-items: center;
}

.calendar-field-value {
    font-size: 15px;
    color: #1E1E1E;
    font-weight: 500;
    line-height: 1.2;
}

.calendar-field-edit-btn {
    background: #44e20f;
    color: white;
    border: none;
    padding: 10px 30px;
    border-radius: 10px;
    font: 500 1rem/1.625em Inter, sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-right: -20px;
}

.calendar-field-edit-btn:hover {
    background: #5ec23d;
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(102, 234, 115, 0.151);
}

.calendar-field-edit-btn i {
    font-size: 15px;
    margin-right: 8px;
}

/* Guest number field smooth reveal */
#wr_number_of_guests_container {
    transition: all 0.5s ease;
}

#wr_number_of_guests_container.revealing {
    opacity: 0;
    transform: translateY(0);
}

#wr_number_of_guests_container.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive styles for collapsed calendar field */
@media (max-width: 767px) {
    .calendar-field-collapsed {
        padding: 0 15px;
        height: 56px;
    }
    
    .calendar-field-main {
        gap: 10px;
    }
    
    .calendar-field-icon {
        font-size: 18px;
    }
    
    .calendar-field-label {
        font-size: 11px;
    }
    
    .calendar-field-value {
        font-size: 14px;
    }
    
    .calendar-field-edit-btn {
        padding: 5px 10px;
        font-size: 11px;
    }
    
    .calendar-field-edit-btn span {
        display: none;
    }
    
    .calendar-field-edit-btn i {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .calendar-field-collapsed {
        height: 52px;
        padding: 0 12px;
    }
    
    .calendar-field-main {
        gap: 8px;
    }
    
    .calendar-field-icon {
        font-size: 16px;
    }
    
    .calendar-field-value {
        font-size: 13px;
    }
    
    .calendar-field-edit-btn {
        padding: 4px 8px;
        min-width: 32px;
        justify-content: center;
    }
}

/* Responsive layout for calendar months */
@media (max-width: 767px) {
    .wr-modern-calendar-wrapper {
        max-width: 100%;
    }
    
    .modern-calendar-widget {
        min-width: auto;
    }
    
    .calendar-body {
        flex-direction: column !important;
        min-height: auto;
    }
    
    .calendar-month {
        flex: 1 1 auto;
        min-width: auto;
        border-right: none !important;
    }
    
    .calendar-month:first-child {
        border-right: none;
        border-bottom: 1px solid #e5e5e5;
    }
    
    .month-nav-btn {
        width: 28px;
        height: 28px;
        font-size: 21px;
    }
}

@media (min-width: 768px) {
    .calendar-body {
        flex-direction: row !important;
    }
    
    .calendar-month {
        flex: 1 1 50% !important;
    }
    
    .calendar-month:first-child {
        border-right: 1px solid #e5e5e5 !important;
        border-bottom: none;
    }
}

/* EMERGENCY LAYOUT FIXES - ULTRA HIGH PRIORITY */
html body .wr-modern-calendar-wrapper .modern-calendar-widget .calendar-body {
    display: flex !important;
    flex-direction: row !important;
    width: 100% !important;
    min-height: 350px !important;
    position: relative !important;
    overflow: hidden !important;
}

html body .wr-modern-calendar-wrapper .modern-calendar-widget .calendar-body .calendar-month {
    flex: 1 1 50% !important;
    min-width: 300px !important;
    max-width: 50% !important;
    box-sizing: border-box !important;
    padding: 20px !important;
    position: relative !important;
}

html body .wr-modern-calendar-wrapper .modern-calendar-widget {
    min-width: 700px !important;
    width: 100% !important;
}

/* Triple-force flex layout */
.calendar-body, 
.modern-calendar-widget .calendar-body,
.wr-modern-calendar-wrapper .calendar-body,
html .wr-modern-calendar-wrapper .modern-calendar-widget .calendar-body {
    display: flex !important;
    flex-direction: row !important;
    align-items: stretch !important;
    justify-content: space-between !important;
}

/* Triple-force month layout */
.calendar-month,
.modern-calendar-widget .calendar-month,
.wr-modern-calendar-wrapper .calendar-month,
html .wr-modern-calendar-wrapper .modern-calendar-widget .calendar-month {
    flex: 1 1 50% !important;
    min-width: 300px !important;
    max-width: 50% !important;
    width: 50% !important;
}

/* Force responsive behavior on desktop */
@media screen and (min-width: 768px) {
    html body .wr-modern-calendar-wrapper .modern-calendar-widget .calendar-body {
        flex-direction: row !important;
        display: flex !important;
    }
    
    html body .wr-modern-calendar-wrapper .modern-calendar-widget .calendar-body .calendar-month {
        flex: 1 1 50% !important;
        width: 50% !important;
        min-width: 300px !important;
        max-width: 50% !important;
    }
}

/* ==================================================================
   ULTIMATE LAYOUT FORCE - OSTATECZNE NAPRAWIENIE UKŁADU KALENDARZA
   Te reguły mają najwyższy możliwy priorytet i powinny naprawić problem
   ================================================================== */

/* Mega-force dla kontenera głównego */
html body div.wr-modern-calendar-wrapper div.modern-calendar-widget div.calendar-body,
.wr-modern-calendar-wrapper .modern-calendar-widget .calendar-body,
div.wr-modern-calendar-wrapper div.modern-calendar-widget div.calendar-body {
    display: flex !important;
    flex-direction: row !important;
    width: 100% !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    justify-content: space-between !important;
    min-height: 350px !important;
    position: relative !important;
    overflow: hidden !important;
}

/* Mega-force dla miesięcy */
html body div.wr-modern-calendar-wrapper div.modern-calendar-widget div.calendar-body div.calendar-month,
.wr-modern-calendar-wrapper .modern-calendar-widget .calendar-body .calendar-month,
div.wr-modern-calendar-wrapper div.modern-calendar-widget div.calendar-body div.calendar-month {
    flex: 1 1 50% !important;
    flex-grow: 1 !important;
    flex-shrink: 1 !important;
    flex-basis: 50% !important;
    width: 50% !important;
    min-width: 300px !important;
    max-width: 50% !important;
    box-sizing: border-box !important;
    padding: 20px !important;
    position: relative !important;
    margin: 0 !important;
    float: none !important;
    clear: none !important;
}

/* Specificzne reguły dla każdego miesiąca */
html body div.wr-modern-calendar-wrapper div.modern-calendar-widget div.calendar-body div.calendar-month.month-1,
.wr-modern-calendar-wrapper .modern-calendar-widget .calendar-body .calendar-month.month-1 {
    border-right: 1px solid #e5e5e5 !important;
    order: 1 !important;
}

html body div.wr-modern-calendar-wrapper div.modern-calendar-widget div.calendar-body div.calendar-month.month-2,
.wr-modern-calendar-wrapper .modern-calendar-widget .calendar-body .calendar-month.month-2 {
    order: 2 !important;
}

/* Appointments List Skeleton Loader */
.wr-appointments-skeleton-loader {
    padding: 15px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.wr-appointments-skeleton-loader h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 20px;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #22c55e;
    padding-bottom: 10px;
}

.wr-skeleton-item {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    margin-bottom: 20px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.wr-skeleton-content {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.wr-skeleton-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #e9ecef;
    flex-shrink: 0;
}

.wr-skeleton-info {
    flex: 1;
}

.wr-skeleton-line {
    background: #e9ecef;
    border-radius: 4px;
    margin-bottom: 8px;
}

.wr-skeleton-line.title {
    height: 20px;
    width: 200px;
}

.wr-skeleton-line.subtitle {
    height: 16px;
    width: 300px;
}

.wr-skeleton-button {
    width: 100px;
    height: 36px;
    background: #e9ecef;
    border-radius: 8px;
    flex-shrink: 0;
}

/* Shimmer animation */
.wr-skeleton-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Old animation classes removed */

/* Prevent height jumping during collapse */
.wr-booked-appointment-item.animating .wr-collapsed-layout {
    min-height: auto;
    transition: all 0.4s ease;
}

/* Booked Appointments List Expandable Styles */
.wr-booked-appointment-items {
    padding: 0;
    margin: 0;
}

.wr-booked-appointment-item {
    margin-bottom: 20px;
    overflow: hidden;
    transition: all 0.4s ease;
}

.wr-booked-appointment-item:hover {
    transform: translateY(0);
}

.wr-booked-appointment-item.expanded {
    transform: translateY(0);
}

/* New minimal animation for wr-project-table-content */
.wr-project-table-content {
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
    transform-origin: top;
}

.wr-project-table-content.collapsed {
    max-height: 0;
    opacity: 0;
    transform: scaleY(0);
    margin: 0;
    padding: 0;
}

.wr-project-table-content.expanded {
    max-height: 1000px;
    opacity: 1;
    transform: scaleY(1);
    margin: 15px 0;
    padding: 15px;
}

/* Smooth content fade-in */
.wr-project-table-content .wr-detailed-content {
    transition: opacity 0.2s ease-in-out 0.1s;
}

.wr-project-table-content.collapsed .wr-detailed-content {
    opacity: 0;
    transition-delay: 0s;
}

.wr-project-table-content.expanded .wr-detailed-content {
    opacity: 1;
    transition-delay: 0.1s;
}

/* Optional: Subtle hover effect for interactive elements */
.wr-booked-appointment-items .wr-project-wrapper:hover {
    transform: translateY(0);
    transition: transform 0.2s ease;
}

/* Updated styles for new structure */
.wr-project-table-content.collapsed {
    margin-bottom: 0;
}

.wr-profile-view {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    margin-bottom: 0;
    overflow: hidden;
    transition: all 0.4s ease;
}

.wr-project-table-content:hover .wr-profile-view {
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    transform: translateY(0);
}

.wr-profile-view .wr-project-table-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    gap: 15px;
}

.wr-profile-view .wr-project-table-info {
    flex: 1;
    margin-left: 15px;
}

.wr-profile-view .wr-project-table-info h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.wr-profile-view .wr-blogviewdates {
    margin: 0;
    display: flex;
    gap: 20px;
    align-items: center;
}

.wr-profile-view .wr-blogviewdates li {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #666;
    font-size: 14px;
}

.wr-profile-view .wr-blogviewdates li i {
    color: #22c55e;
    font-size: 14px;
}

/* Profile image in collapsed state */
.wr-profile-view .wr-profile-img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid #f1f3f5;
}

.wr-profile-view .wr-default-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #f1f3f5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    flex-shrink: 0;
    border: 2px solid #e9ecef;
}

/* Detailed content */
.wr-detailed-content {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transform: translateY(0);
    transition: all 0.4s ease;
}

.wr-booked-appointment-item.expanded .wr-detailed-content {
    display: block;
    opacity: 1;
    max-height: none;
    transform: none;
    padding-top: 0;
    margin-top: -15px;
}
.wr-booked-appointment-item.expanded .wr-profile-view,
.wr-booked-appointment-item.expanded .wr-header-profile-view {
    padding-bottom: 0 !important;
}
/* Animation classes removed - instant toggle only */
/* Collapsed state - instant with no animations */
.wr-profile-view.collapsed,
.wr-header-profile-view.collapsed {
    padding-bottom: 29px !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    display: block !important;
}

/* Force collapsed state on all children */
.wr-profile-view.collapsed .wr-project-table-content,
.wr-header-profile-view.collapsed .wr-project-table-content {
    padding: 8px 20px !important;
    box-sizing: border-box !important;
    align-items: center !important;
    display: flex !important;
}

.wr-profile-view.collapsed .wr-profile-img,
.wr-header-profile-view.collapsed .wr-profile-img,
.wr-profile-view.collapsed .wr-default-avatar,
.wr-header-profile-view.collapsed .wr-default-avatar {
    width: 40px !important;
    height: 40px !important;
}

/* Height control removed - no animations */

/* Detailed content styling */
.wr-detailed-content .wr-project-box {
    margin-bottom: 15px;
    margin-top: 15px;
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-bottom: none;
}

.wr-detailed-content .wr-project-box:last-child {
    margin-bottom: 0;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

/* New minimal highlight animation for clicked items */
.wr-booked-appointment-item.minimal-highlight {
    animation: minimalHighlight 0.4s ease-out;
}

@keyframes minimalHighlight {
    0% {
        transform: translateY(0);
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
    50% {
        transform: translateY(0);
        box-shadow: 0 4px 12px rgba(34, 197, 94, 0.15);
    }
    100% {
        transform: translateY(0);
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
}

/* Responsive adjustments for booked appointments */
@media (max-width: 767px) {
    .wr-profile-view .wr-project-table-content {
        padding: 12px 16px;
        gap: 12px;
    }
    
    .wr-profile-view .wr-profile-img,
    .wr-profile-view .wr-default-avatar {
        width: 40px;
        height: 40px;
    }
    
    .wr-profile-view .wr-project-table-info h4 {
        font-size: 15px;
    }
    
    .wr-profile-view .wr-blogviewdates {
        gap: 15px;
    }
    
    .wr-profile-view .wr-blogviewdates li {
        font-size: 13px;    }
}

@media (max-width: 480px) {
    .wr-profile-view .wr-project-table-content {
        padding: 10px 14px;
        gap: 10px;
        flex-wrap: wrap;
    }
    
    .wr-profile-view .wr-profile-img,
    .wr-profile-view .wr-default-avatar {
        width: 35px;
        height: 35px;
    }
    
    .wr-profile-view .wr-project-table-info {
        margin-left: 10px;
        flex: 1;
        min-width: 0;
    }
    
    .wr-profile-view .wr-project-table-info h4 {
        font-size: 14px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .wr-profile-view .wr-blogviewdates {
        gap: 10px;
        flex-wrap: wrap;
    }
      .wr-profile-view .wr-blogviewdates li {
        font-size: 12px;
    }
}

/* Canceled appointments styling */
.wr-canceled-appointment {
    opacity: 0.6;
    filter: grayscale(20%);
}

.wr-canceled-appointment .wr-collapsed-layout {
    background: #f8f9fa;
    border-color: #dee2e6;
}

.wr-canceled-appointment .wr-collapsed-layout:hover {
    background: #f1f3f5;
}

/* Rejected appointments styling */
.wr-rejected-appointment {
    opacity: 0.6;
    filter: grayscale(20%);
}

.wr-rejected-appointment .wr-collapsed-layout {
    background: #f8f9fa;
    border-color: #dee2e6;
}

.wr-rejected-appointment .wr-collapsed-layout:hover {
    background: #f1f3f5;
}

/* Common styling for inactive appointments (canceled + rejected) */
.wr-inactive-appointment {
    opacity: 0.6;
    filter: grayscale(20%);
}

.wr-inactive-appointment .wr-collapsed-layout {
    background: #f8f9fa;
    border-color: #dee2e6;
}

.wr-inactive-appointment .wr-collapsed-layout:hover {
    background: #f1f3f5;
}

.wr-strikethrough {
    text-decoration: line-through;
    color: #6c757d;
}

.wr-canceled-status {
    background: #6c757d !important;
    color: white !important;
}

.wr-rejected-status {
    background: #dc3545 !important;
    color: white !important;
}

/* Past appointments section */
.wr-past-appointments-section {
    margin-top: 30px;
    border-top: 2px solid #e9ecef;
    padding-top: 20px;
}

.wr-past-appointments-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    padding: 15px 20px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    margin-bottom: 0;
    transition: all 0.3s ease;
}

.wr-past-appointments-header:hover {
    background: #e9ecef;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.wr-past-appointments-header h3 {
    margin: 0;
    color: #495057;
    font-size: 18px;
    font-weight: 600;
}

.wr-past-toggle-btn {
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.wr-past-toggle-btn:hover {
    background: #5a6268;
    transform: scale(1.05);
}

.wr-past-toggle-btn i {
    transition: transform 0.3s ease;
}

.wr-past-appointments-content {
    margin-top: 20px;
    animation: slideDown 0.4s ease-out;
}

/* ========================================
   WORKREAP BOOKING WIDGET STYLES  
   ======================================== */

.wr-booking-widget {
    max-width: 100%;
    margin: 0 auto;
    overflow: hidden;
}

/* Pasek postępu */
.wr-booking-progress {
    background: #f8f9fa;
    padding: 20px;
    border-bottom: 1px solid #e5e5e5;
    position: relative;
}

.wr-progress-steps {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 2;
}

.wr-progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    max-width: 120px;
}

.wr-step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e5e5e5;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.wr-step-label {
    font-size: 12px;
    color: #666;
    text-align: center;
    font-weight: 500;
}

.wr-progress-step.active .wr-step-number {
    background: #22c55e;
    color: white;
}

.wr-progress-step.completed .wr-step-number {
    background: #16a34a;
    color: white;
}

.wr-progress-step.active .wr-step-label,
.wr-progress-step.completed .wr-step-label {
    color: #333;
    font-weight: 600;
}

.wr-progress-line {
    position: absolute;
    top: 36px;
    left: 20px;
    right: 20px;
    height: 2px;
    background: #e5e5e5;
    z-index: 1;
}

.wr-progress-fill {
    height: 100%;
    background: #22c55e;
    transition: width 0.4s ease;
    width: 0%;
}

/* Widoki */
.wr-booking-views {
    min-height: 400px;
    position: relative;
    padding: 15px;
}

.wr-booking-view {
    display: none;
    opacity: 0;
    min-height: 400px;
}

/* Widok kalendarza */
.wr-calendar-section {
    text-align: center;
}

.wr-calendar-header {
    margin-bottom: 30px;
}

.wr-calendar-header h3 {
    color: #333;
    margin: 0 0 8px 0;
    font-size: 24px;
    font-weight: 600;
}

.wr-calendar-header p {
    color: #666;
    margin: 0;
    font-size: 16px;
}

/* Wybór godziny */
.wr-time-selection {
    margin-top: 30px;
    text-align: center;
}

.wr-time-selection h4 {
    color: #333;
    margin-bottom: 20px;
    font-size: 20px;
    font-weight: 600;
}

.wr-time-slots {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    max-width: 500px;
    margin: 0 auto;
}

.wr-time-slot {
    background: white;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: #666;
    min-width: 100px;
    justify-content: center;
}

.wr-time-slot:hover {
    border-color: #22c55e;
    background: #f0fdf4;
    color: #16a34a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.15);
}

.wr-time-slot.selected {
    background: #22c55e;
    border-color: #16a34a;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

/* Widok potwierdzenia */
.wr-confirmation-section {
    max-width: 500px;
    margin: 0 auto;
}

.wr-confirmation-header {
    text-align: center;
    margin-bottom: 30px;
}

.wr-confirmation-header h3 {
    color: #333;
    margin: 0 0 8px 0;
    font-size: 24px;
    font-weight: 600;
}

.wr-confirmation-header p {
    color: #666;
    margin: 0;
    font-size: 16px;
}

.wr-booking-summary {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 30px;
    border: 1px solid #e5e5e5;
}

.wr-summary-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid #e5e5e5;
}

.wr-summary-item:last-child {
    border-bottom: none;
}

.wr-summary-item i {
    color: #22c55e;
    font-size: 18px;
    width: 20px;
    text-align: center;
}

.wr-summary-content {
    flex: 1;
}

.wr-summary-content label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
    font-size: 14px;
}

.wr-summary-content span {
    color: #666;
    font-size: 16px;
}

.wr-booking-notes {
    margin-bottom: 30px;
}

.wr-booking-notes label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 16px;
}

.wr-booking-notes textarea {
    width: 100%;
    min-height: 100px;
    padding: 12px;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    font-size: 14px;
    resize: vertical;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.wr-booking-notes textarea:focus {
    outline: none;
    border-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

.wr-character-count {
    margin-top: 4px;
    font-size: 12px;
    color: #666;
    text-align: right;
}

/* Login required */
.wr-login-required {
    margin-bottom: 30px;
}

.wr-login-box {
    text-align: center;
    background: #f8f9fa;
    padding: 30px;
    border-radius: 12px;
    border: 1px solid #e5e5e5;
}

.wr-login-box i {
    font-size: 48px;
    color: #666;
    margin-bottom: 16px;
}

.wr-login-box h4 {
    color: #333;
    margin: 0 0 8px 0;
    font-size: 20px;
    font-weight: 600;
}

.wr-login-box p {
    color: #666;
    margin: 0 0 20px 0;
    font-size: 16px;
}

.wr-login-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Widok sukcesu */
.wr-success-section {
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
}

.wr-success-animation {
    margin-bottom: 30px;
}

.wr-checkmark {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #22c55e;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    transform: scale(0);
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.wr-checkmark.animated {
    transform: scale(1);
}

.wr-checkmark i {
    color: white;
    font-size: 32px;
}

.wr-success-section h3 {
    color: #333;
    margin: 0 0 8px 0;
    font-size: 24px;
    font-weight: 600;
}

.wr-success-section > p {
    color: #666;
    margin: 0 0 30px 0;
    font-size: 16px;
}

.wr-success-details {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 30px;
    border: 1px solid #e5e5e5;
    text-align: left;
}

.wr-detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e5e5e5;
}

.wr-detail-item:last-child {
    border-bottom: none;
}

.wr-detail-item strong {
    color: #333;
    font-weight: 600;
}

.wr-detail-item span {
    color: #666;
}

.wr-booking-status {
    background: #fef3c7;
    color: #92400e;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.wr-success-message {
    background: #dbeafe;
    border: 1px solid #93c5fd;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 30px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    text-align: left;
}

.wr-success-message i {
    color: #2563eb;
    font-size: 18px;
    margin-top: 2px;
}

.wr-success-message p {
    margin: 0;
    color: #1e40af;
    font-size: 14px;
    line-height: 1.5;
}

/* Loading */
.wr-loading-section {
    text-align: center;
    padding: 40px 0;
}

.wr-loading-spinner {
    margin-bottom: 30px;
}

.wr-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #e5e5e5;
    border-top: 4px solid #22c55e;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

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

.wr-loading-section h3 {
    color: #333;
    margin: 0 0 8px 0;
    font-size: 20px;
    font-weight: 600;
}

.wr-loading-section p {
    color: #666;
    margin: 0;
    font-size: 16px;
}

/* Przyciski akcji */
.wr-booking-actions,
.wr-success-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Przyciski używające stylów Workreap */
.wr-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
    justify-content: center;
    outline: none;
}

.wr-btn-primary {
    background: #22c55e;
    color: white;
    border-color: #16a34a;
}

.wr-btn-primary:hover {
    background: #16a34a;
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.wr-btn-secondary {
    background: white;
    color: #666;
    border-color: #e5e5e5;
}

.wr-btn-secondary:hover {
    background: #f8f9fa;
    color: #333;
    text-decoration: none;
    border-color: #d1d5db;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.wr-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Animacje */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.pulse-animation {
    animation: pulse 0.6s ease;
}

/* Booking Widget Specific Styles */
.wr-booking-view {
    display: none;
    margin-top: 30px;
    opacity: 0;
    min-height: 400px;
}

.wr-booking-view.active {
    display: block;
    opacity: 1;
    transform: translateX(0);
}

.calendar-transitioning {
    opacity: 0.7;
    transform: scale(0.98);
    transition: all 0.3s ease;
}

/* ==================================================================
   BOOKING WIDGET SKELETON LOADER STYLES
   For single-month booking calendar
   ======================================== */

.wr-booking-skeleton {
    display: block; /* Widoczny domyślnie */
    animation: none;
    background: rgb(255, 255, 255);
    border-radius: 20px;
}

.wr-booking-skeleton .booking-calendar-widget {
    overflow: hidden;
      background: rgb(255, 255, 255);
    border-radius: 20px;
}

.wr-booking-skeleton .booking-calendar-body {
    padding: 0;
      background: rgb(255, 255, 255);
    border-radius: 20px;
}

.wr-booking-skeleton .booking-calendar-month {
    padding: 20px;
      background: rgb(255, 255, 255);
    border-radius: 20px;
}

.wr-booking-skeleton .skeleton-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    min-height: 40px;
}

.wr-booking-skeleton .skeleton-nav-btn {
    width: 40px;
    height: 40px;
    background: #e2e8f0;
    border-radius: 8px;
    animation: skeletonPulse 1.5s ease-in-out infinite;
}

.wr-booking-skeleton .skeleton-month-name {
    flex: 1;
    height: 24px;
    background: #e2e8f0;
    border-radius: 4px;
    margin: 0 15px;
    animation: skeletonPulse 1.5s ease-in-out infinite;
    animation-delay: 0.2s;
}

.wr-booking-skeleton .skeleton-days-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin-bottom: 10px;
    padding: 0 4px;
}

.wr-booking-skeleton .skeleton-day-name {
    height: 20px;
    background: #e2e8f0;
    border-radius: 4px;
    animation: skeletonPulse 1.5s ease-in-out infinite;
}

.wr-booking-skeleton .skeleton-day-name:nth-child(1) { animation-delay: 0.1s; }
.wr-booking-skeleton .skeleton-day-name:nth-child(2) { animation-delay: 0.2s; }
.wr-booking-skeleton .skeleton-day-name:nth-child(3) { animation-delay: 0.3s; }
.wr-booking-skeleton .skeleton-day-name:nth-child(4) { animation-delay: 0.4s; }
.wr-booking-skeleton .skeleton-day-name:nth-child(5) { animation-delay: 0.5s; }
.wr-booking-skeleton .skeleton-day-name:nth-child(6) { animation-delay: 0.6s; }
.wr-booking-skeleton .skeleton-day-name:nth-child(7) { animation-delay: 0.7s; }

.wr-booking-skeleton .skeleton-days-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    padding: 0 4px;
}

.wr-booking-skeleton .skeleton-day {
    aspect-ratio: 1;
    background: #e2e8f0;
    border-radius: 8px;
    animation: skeletonPulse 1.5s ease-in-out infinite;
    min-height: 40px;
}

/* Staggered animation for skeleton days */
.wr-booking-skeleton .skeleton-day:nth-child(1) { animation-delay: 0.1s; }
.wr-booking-skeleton .skeleton-day:nth-child(2) { animation-delay: 0.15s; }
.wr-booking-skeleton .skeleton-day:nth-child(3) { animation-delay: 0.2s; }
.wr-booking-skeleton .skeleton-day:nth-child(4) { animation-delay: 0.25s; }
.wr-booking-skeleton .skeleton-day:nth-child(5) { animation-delay: 0.3s; }
.wr-booking-skeleton .skeleton-day:nth-child(6) { animation-delay: 0.35s; }
.wr-booking-skeleton .skeleton-day:nth-child(7) { animation-delay: 0.4s; }
.wr-booking-skeleton .skeleton-day:nth-child(8) { animation-delay: 0.45s; }
.wr-booking-skeleton .skeleton-day:nth-child(9) { animation-delay: 0.5s; }
.wr-booking-skeleton .skeleton-day:nth-child(10) { animation-delay: 0.55s; }

@keyframes skeletonPulse {
    0% {
        background-color: #e2e8f0;
    }
    50% {
        background-color: #cbd5e0;
    }
    100% {
        background-color: #e2e8f0;
    }
}

/* Responsive skeleton loader */
@media (max-width: 768px) {
    .wr-booking-skeleton .booking-calendar-month {
        padding: 15px;
    }
    
    .wr-booking-skeleton .skeleton-nav-btn {
        width: 36px;
        height: 36px;
    }
    
    .wr-booking-skeleton .skeleton-day {
        min-height: 36px;
    }
    
    .wr-booking-skeleton .skeleton-days-grid {
        gap: 6px;
    }
    
    .wr-booking-skeleton .skeleton-days-header {
        gap: 6px;
    }
}

@media (max-width: 480px) {
    .wr-booking-skeleton .booking-calendar-month {
        padding: 10px;
    }
    
    .wr-booking-skeleton .skeleton-nav-btn {
        width: 32px;
        height: 32px;
    }
    
    .wr-booking-skeleton .skeleton-day {
        min-height: 32px;
    }
    
    .wr-booking-skeleton .skeleton-days-grid {
        gap: 4px;
    }
    
    .wr-booking-skeleton .skeleton-days-header {
        gap: 4px;
    }
}

/* ========================================
   BOOKING WIDGET LOADING STYLES
   ======================================== */

.wr-booking-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    z-index: 1000;
    border-radius: 12px;
}

.wr-booking-loading.active {
    display: flex;
}

.wr-loader {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: loaderSpin 1s linear infinite;
    margin-bottom: 10px;
}

@keyframes loaderSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.wr-booking-loading span {
    color: #666;
    font-size: 14px;
    font-weight: 500;
}

/* ========================================
   BOOKING CALENDAR DEBUG AND FALLBACK STYLES
   ======================================== */

/* Debug styles - show grid structure */
.booking-calendar-widget {
    min-height: 400px;
}

.booking-calendar-body {
    min-height: 320px;
}

.booking-calendar-month {
    min-height: 300px;
    display: grid; 
}

/* Force grid layout for days */
.booking-days-grid {
    display: grid !important;
    grid-template-columns: repeat(7, 1fr) !important;
    gap: 3px !important;
    min-height: 240px !important;
    padding: 0 4px !important;
}

.booking-days-header {
    display: grid !important;
    grid-template-columns: repeat(7, 1fr) !important;
    gap: 3px !important;
    margin-bottom: 10px !important;
    padding: 0 4px !important;
}

/* Ensure day tiles have proper size */
.booking-day-tile {
    aspect-ratio: 1 !important;
    min-width: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 10px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    position: relative !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
}

/* Day name styling */
.booking-day-name {
    text-align: center !important;
    font-weight: 600 !important;
    font-size: 12px !important;
    color: #71809674 !important;
    padding: 8px 4px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    margin: -5px;
}

/* Force visibility of calendar elements */
.booking-calendar-widget,
.booking-calendar-body,
.booking-calendar-month,
.booking-days-header,
.booking-days-grid,
.booking-day-tile,
.booking-day-name {
    visibility: visible !important;
    opacity: 1 !important;
    display: block !important;
     margin: -5px;
}

.booking-days-grid {
    display: grid !important;
}

.booking-days-header {
    display: grid !important;
}

.booking-day-tile {
    display: flex !important;
}

/* CSS Grid Fallback for older browsers */
@supports not (display: grid) {
    .booking-days-header,
    .booking-days-grid {
        display: flex !important;
        flex-wrap: wrap !important;
    }
    
    .booking-day-name,
    .booking-day-tile {
        width: calc(14.28% - 8px) !important;
        margin: 4px !important;
    }
}

/* Skeleton positioning fix */
.wr-booking-skeleton {
    position: relative !important;
    z-index: 10 !important;
    margin-top: 30px;
}

/* Loading overlay positioning */
.wr-booking-loading {
    z-index: 20 !important;
}

/* Calendar widget positioning */
.booking-calendar-widget {
    position: relative !important;
    z-index: 1 !important;
}

/* End of Booking Calendar Debug Styles */

/* ==================================================================
   BOOKING WIDGET - SINGLE MONTH CALENDAR STYLES
   Dedykowane style dla booking-* klas używanych w HTML widgetu
   ================================================================== */

/* Main booking widget container */
.booking-calendar-widget {
    border-radius: 20px;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
}

/* Booking calendar body */
.booking-calendar-body {
    padding: 0;
    width: 100% !important;
    display: block !important;
}

/* Single month container */
.booking-calendar-month {
    padding: 20px;
    width: 100%;
    box-sizing: border-box;
}

/* Month header with navigation */
.booking-month-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
    font-size: 18px;
    color: #333;
    margin-bottom: 20px;
    min-height: 40px;
    position: relative;
}

/* Month name in center */
.booking-month-title #booking-month-name {
    flex: 1;
    text-align: center;
    padding: 0 10px;
}

/* Month navigation buttons */
.booking-month-nav-btn {
    background: #22c55e37;
    border: 1px solid #22c55e;
    color: #22c55e;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.booking-month-nav-btn:hover {
    background: #22c55e67;
    border-color: #16a34a;
    transform: scale(1.05);
}

.booking-month-nav-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}

/* Days header with CSS Grid */
.booking-days-header {
    display: grid !important;
    grid-template-columns: repeat(7, 1fr) !important;
    gap: 4px !important;
    margin-bottom: 8px !important;
    background: #f8f9fa;
    padding: 8px 4px;
    border-radius: 8px;
}

/* Day names */
.booking-day-name {
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: #66666685;
    text-transform: uppercase;
    padding: 8px 4px;
    letter-spacing: 0.5px;
     margin: -5px;
}

/* Days grid with CSS Grid */
.booking-days-grid {
    display: grid !important;
    grid-template-columns: repeat(7, 1fr) !important;
    gap: 3px !important;
    padding: 4px;
}

/* Individual day tiles */
.booking-day-tile {
    aspect-ratio: 1 !important;
    min-height: 42px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative !important;
    color: #374151 !important;
}

/* Day tile hover effect */
.booking-day-tile:hover:not(.disabled) {
    background: #e8f4fd !important;
    border-color: #22c55e !important;
    transform: scale(1.05) !important;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.15) !important;
}

/* Selected day */
.booking-day-tile.selected {
    background: #22c55e !important;
    color: white !important;
    border-color: #16a34a !important;
    transform: scale(1.1) !important;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3) !important;
    font-weight: 600 !important;
}

/* Today highlight */
.booking-day-tile.today {
    border: 2px solid #22c55e !important;
    font-weight: 700 !important;
}

.booking-day-tile.today.selected {
    border: 2px solid #fff !important;
}

/* Disabled days */
.booking-day-tile.disabled {
    color: #d1d5db !important;
    background: #f9fafb !important;
    cursor: not-allowed !important;
    border-color: #f3f4f6 !important;
}

.booking-day-tile.disabled:hover {
    transform: none !important;
    box-shadow: none !important;
    background: #f9fafb !important;
}

/* Empty days (padding days from other months) */
.booking-day-tile.empty {
    visibility: hidden;
}

/* Availability status styles */
.booking-day-tile.status-approved {
    background: rgba(34, 197, 94, 0.1) !important;
    border-color: rgba(34, 197, 94, 0.3) !important;
}

.booking-day-tile.status-rejected {
    background: rgba(239, 68, 68, 0.1) !important;
    border-color: rgba(239, 68, 68, 0.3) !important;
    color: #ef4444 !important;
}

.booking-day-tile.status-rejected.disabled {
    opacity: 0.6;
    cursor: not-allowed !important;
}

/* Loading overlay */
.wr-booking-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    border-radius: 12px;
}

/* Spinner for loading */
.wr-loader {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f4f6;
    border-top: 3px solid #22c55e;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

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

.wr-booking-loading span {
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
}

/* View transitions */
.wr-booking-view {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.wr-booking-view:not([style*="display: none"]) {
    opacity: 1;
    transform: translateY(0);
}

/* Force remove all backgrounds and shadows from main booking elements */
.wr-booking-widget,
.wr-booking-view,
.wr-modern-calendar-wrapper,
.modern-calendar-widget {
    background: none !important;
    background-color: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    border: none !important;
}

/* Ensure no backgrounds on specific booking view containers */
.wr-booking-view .wr-asideholder,
.wr-booking-view > div,
.booking-view-login .wr-asideholder {
    background: none !important;
    background-color: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    border: none !important;
}

/* ========================================
   ENHANCED BOOKING CONFIRMATION VIEW STYLES
   Following modern UX/UI best practices
   ======================================== */

/* Confirmation Container */
.wr-booking-confirm-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 0;
    background: transparent;
}

.wr-booking-confirm-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 0;
    background: transparent;
    margin: 20px;
}

/* Header Section */
.wr-booking-confirm-header {
    text-align: center;
    margin-bottom: 8px;
}

.wr-booking-confirm-title {
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.wr-booking-confirm-subtitle {
    font-size: 16px;
    color: #6b7280;
    margin: 0;
    line-height: 1.4;
}

/* Date Summary Section */
.wr-booking-date-summary {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    position: relative;
}

.wr-booking-date-summary:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
}

.wr-booking-date-summary .calendar-field-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.wr-field-label {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.calendar-field-edit-btn {
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.calendar-field-edit-btn:hover {
    background: #5a67d8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.wr-selected-date {
    font-size: 20px;
    font-weight: 600;
    color: #059669;
    display: block;
}

/* Service Information */
.wr-booking-service-info {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 12px;
    padding: 20px;
}

.wr-service-title {
    font-size: 18px;
    font-weight: 600;
    color: #0c4a6e;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.wr-service-description {
    font-size: 14px;
    color: #0369a1;
    margin: 0;
    line-height: 1.5;
}

/* Enhanced Form Styling */
.wr-booking-form {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
}

.wr-form-group {
    margin-bottom: 0;
}

.wr-form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

.wr-label-optional {
    font-weight: 400;
    color: #9ca3af;
    font-size: 13px;
}

.wr-booking-textarea {
    width: 100%;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
    line-height: 1.5;
    color: #374151;
    background: #fafafa;
    transition: all 0.3s ease;
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
}

.wr-booking-textarea:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.wr-booking-textarea::placeholder {
    color: #9ca3af;
}

.form-text {
    font-size: 12px;
    color: #6b7280;
    margin-top: 6px;
    display: block;
}

/* Enhanced Action Buttons */
.wr-booking-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 8px;
}

/* Back Button Styling */
.wr-btn-back {
    background: white;
    color: #6b7280;
    border: 2px solid #e5e7eb;
    padding: 14px 20px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    min-width: 140px;
    justify-content: center;
}

.wr-btn-back:hover {
    background: #f9fafb;
    color: #374151;
    border-color: #d1d5db;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-decoration: none;
}

/* Confirm Button - Using wr-btn-solid-lg class */
.wr-btn-confirm {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    min-width: 180px;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
    text-transform: none;
    letter-spacing: 0.5px;
}

.wr-btn-confirm:hover {
    background: linear-gradient(135deg, #047857 0%, #065f46 100%);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(5, 150, 105, 0.4);
    text-decoration: none;
}

.wr-btn-confirm:active {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.3);
}

.wr-btn-confirm:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.2), 0 4px 12px rgba(5, 150, 105, 0.3);
}

/* Loading state for confirm button */
.wr-btn-confirm:disabled {
    background: #d1d5db;
    color: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Button icon styling */
.wr-btn i {
    font-size: 14px;
    flex-shrink: 0;
}

.wr-btn-confirm i {
    font-size: 16px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .wr-booking-confirm-title {
        font-size: 20px;
    }
    
    .wr-booking-confirm-subtitle {
        font-size: 14px;
    }
    
    .wr-booking-actions {
        flex-direction: column;
        gap: 12px;
    }
    
    .wr-btn-back,
    .wr-btn-confirm {
        width: 100%;
        min-width: auto;
    }
    
    .wr-booking-form,
    .wr-booking-date-summary,
    .wr-booking-service-info {
        padding: 16px;
    }
    
    .wr-booking-confirm-content {
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .wr-booking-confirm-container {
        padding: 0 8px;
    }
    
    .wr-booking-confirm-title {
        font-size: 18px;
    }
    
    .wr-selected-date {
        font-size: 18px;
    }
    
    .wr-service-title {
        font-size: 16px;
    }
}

/* Accessibility Improvements */
.wr-btn:focus-visible,
.calendar-field-edit-btn:focus-visible,
.wr-booking-textarea:focus-visible {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Animation for view entrance */
.wr-booking-view#booking-view-confirm {
    animation: slideInUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .wr-booking-date-summary,
    .wr-booking-service-info,
    .wr-booking-form {
        border-width: 2px;
        border-color: #000;
    }
    
    .wr-btn-confirm {
        background: #000;
        border: 2px solid #000;
    }
    
    .wr-btn-back {
        border-color: #000;
        color: #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .wr-btn,
    .calendar-field-edit-btn,
    .wr-booking-textarea,
    .wr-booking-date-summary {
        transition: none;
    }
    
    .wr-booking-view#booking-view-confirm {
        animation: none;
    }
}