/**
 * Workout "Add to Planner" confirmation screen inside the planner drawer.
 * Matches planner-new-ui/workout-confirm-modal design.
 * All classes prefixed with wc- (workout-confirm) to avoid conflicts with existing styles.
 */

.wc-scrollable {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: auto;
}

.wc-header {
    border-color: rgba(0, 0, 0, 0.2);
    border-bottom-width: 1px;
    border-bottom-style: solid;
    z-index: 0;
    width: 100%;
    padding: 0 20px 16px;
    flex-shrink: 0;
}

.wc-header-content {
    display: flex;
    align-items: center;
    gap: 40px 100px;
    color: rgba(0, 0, 0, 1);
    justify-content: space-between;
    flex-wrap: wrap;
}

.wc-header-text {
    align-self: stretch;
    display: flex;
    min-width: 240px;
    flex-direction: column;
    align-items: stretch;
    justify-content: start;
    width: 252px;
    margin: auto 0;
}

.wc-title {
    font-size: 16px;
    font-weight: 500;
    margin: 0;
    font-family:
        Montserrat,
        -apple-system,
        Roboto,
        Helvetica,
        sans-serif;
}

.wc-date-time {
    align-self: start;
    display: flex;
    margin-top: 4px;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 400;
    justify-content: start;
}

.wc-date-time-text {
    align-self: stretch;
    margin: auto 0;
}

.wc-calendar-icon {
    aspect-ratio: 1;
    object-fit: contain;
    object-position: center;
    width: 16px;
    align-self: stretch;
    flex-shrink: 0;
    margin: auto 0;
}

.wc-back-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    align-self: stretch;
    flex-shrink: 0;
    margin: auto 0;
}

.wc-back-icon {
    aspect-ratio: 1;
    object-fit: contain;
    object-position: center;
    width: 24px;
    align-self: stretch;
    flex-shrink: 0;
    margin: auto 0;
}

.wc-content {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 0 16px;
}

.wc-confirmation-section {
    align-self: start;
    z-index: 0;
    display: flex;
    margin-top: 20px;
    align-items: center;
    gap: 12px;
    justify-content: start;
    padding: 0 0;
}

.wc-confirmation-icon-wrapper {
    border-radius: 18px;
    background-color: rgba(237, 237, 237, 1);
    align-self: stretch;
    display: flex;
    min-height: 24px;
    align-items: center;
    gap: 10px;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin: auto 0;
    padding: 0 4px;
}

.wc-confirmation-icon {
    aspect-ratio: 1;
    object-fit: contain;
    object-position: center;
    width: 16px;
    align-self: stretch;
    margin: auto 0;
}

.wc-confirmation-text {
    color: rgba(0, 0, 0, 1);
    align-self: stretch;
    margin: auto 0;
    font:
        400 14px Montserrat,
        -apple-system,
        Roboto,
        Helvetica,
        sans-serif;
}

.wc-workout-card {
    position: relative;
    z-index: 0;
    display: flex;
    width: 100%;
    align-items: start;
    gap: 16px;
    justify-content: start;
    padding: 0 0;
}

@media (max-width: 991px) {
    .wc-workout-card {
        max-width: 100%;
    }
}

.wc-workout-image-container {
    position: relative;
    z-index: 0;
    min-width: 240px;
    flex: 1;
    flex-shrink: 1;
    flex-basis: 12px;
}

.wc-workout-image {
    aspect-ratio: 1.5;
    object-fit: cover;
    object-position: center;
    width: 100%;
    border-radius: 8px;
    z-index: 0;
    min-width: 240px;
    flex: 1;
    flex-shrink: 1;
    flex-basis: 12px;
}

.wc-rating-badge {
    border-radius: 64px;
    background-color: rgba(255, 255, 255, 1);
    position: absolute;
    z-index: 0;
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 12px;
    color: var(--Text, #10152c);
    font-weight: 600;
    white-space: nowrap;
    justify-content: center;
    left: 10px;
    top: 10px;
    padding: 4px 6px;
}

@media (max-width: 991px) {
    .wc-rating-badge {
        white-space: initial;
    }
}

.wc-star-icon {
    align-self: stretch;
    display: flex;
    width: 12px;
    flex-shrink: 0;
    height: 12px;
    margin: auto 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23FFD700'%3E%3Cpath d='M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

.wc-rating-text {
    color: var(--Text, #10152c);
    align-self: stretch;
    margin: auto 0;
}

.wc-workout-details {
    z-index: 0;
    min-width: 240px;
    min-height: 80px;
    flex: 1;
    flex-shrink: 1;
    flex-basis: 12px;
}

.wc-workout-info {
    display: flex;
    width: 100%;
    max-width: 374px;
    flex-direction: column;
    align-items: stretch;
    justify-content: start;
}

.wc-workout-title {
    color: rgba(16, 21, 44, 1);
    font-size: 20px;
    font-weight: 600;
    margin: 0;
    font-family:
        Montserrat,
        -apple-system,
        Roboto,
        Helvetica,
        sans-serif;
}

.wc-workout-duration {
    align-self: start;
    display: flex;
    margin-top: 12px;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: rgba(0, 0, 0, 1);
    font-weight: 500;
    justify-content: start;
}

.wc-duration-icon {
    aspect-ratio: 1;
    object-fit: contain;
    object-position: center;
    width: 14px;
    align-self: stretch;
    flex-shrink: 0;
    margin: auto 0;
}

.wc-duration-text {
    align-self: stretch;
    margin: auto 0;
}

/* Workout confirm options (REPEAT + NOTIFY) - separate from recipe-confirm styles */
.wc-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
    margin-top: 20px;
    gap: 10px;
}

.wc-option-card {
    min-width: 0;
    border-radius: 4px;
    background-color: rgba(240, 245, 255, 1);
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.wc-option-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    border: none;
    background: none;
    padding: 0;
    width: 100%;
    text-align: left;
}

.wc-option-label {
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(0, 0, 0, 1);
}

.wc-repeat-panel {
    margin-top: 20px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.wc-custom-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.wc-custom-row {
    display: flex;
    align-items: center;
    gap: 20px;
}

.wc-custom-label {
    width: 35px;
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 400;
    color: #000;
}

.wc-custom-inputs {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
}

.wc-unit-dropdown-wrapper {
    position: relative;
    flex: 1;
    min-width: 0;
}

.wc-custom-inputs .wc-unit-dropdown-wrapper:first-child {
    width: 90px;
    flex: none;
}

.wc-unit-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-radius: 8px;
    border: none;
    background-color: #fff;
    font-size: 12px;
    font-weight: 500;
    color: #000;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
}

.wc-unit-trigger:hover {
    background-color: #f8f9fa;
}

.wc-unit-arrow {
    flex-shrink: 0;
    margin-left: 8px;
}

.wc-unit-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 4px;
    min-width: 120px;
    max-height: 200px;
    overflow-y: auto;
    border-radius: 8px;
    background-color: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.25);
    flex-direction: column;
    padding: 12px;
    font:
        500 12px/1.6 Montserrat,
        -apple-system,
        Roboto,
        Helvetica,
        sans-serif;
    z-index: 100;
}

.wc-unit-dropdown--open {
    display: flex;
}

.wc-period-option {
    display: flex;
    width: 100%;
    align-items: center;
}

.wc-period-option:not(:first-child) {
    margin-top: 6px;
}

.wc-period-btn {
    color: #000;
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    cursor: pointer;
    text-align: left;
    width: 100%;
}

.wc-period-btn:hover {
    opacity: 0.8;
}

.wc-custom-suffix {
    font-size: 12px;
    font-weight: 400;
    color: #000;
}

/* End date and occurrences rows for repeat "Ends" options */
.wc-ends-date-row .wc-custom-label,
.wc-ends-occurrences-row .wc-custom-label {
    width: auto;
    min-width: 70px;
}

.wc-ends-date-input-wrapper {
    flex: 1;
    min-width: 0;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wc-ends-occurrences-input-wrapper {
    width: 90px;
    flex: none;
}

.wc-ends-date-input,
.wc-ends-occurrences-input {
    height: 32px;
    border: none;
    padding: 10px;
    font-size: 12px;
    font-weight: 500;
    width: 100%;
}

/* Date input when calendar is open (inline mode: matches recipe-confirm) */
.wc-ends-date-input-wrapper:has(.flatpickr-calendar.open) .wc-ends-date-input,
.wc-ends-date-input-wrapper:has(.flatpickr-calendar.open) .wc-ends-date-input.flatpickr-input,
.wc-ends-date-input-wrapper:has(.flatpickr-calendar) .wc-ends-date-input,
.wc-ends-date-input-wrapper:has(.flatpickr-calendar) .wc-ends-date-input.flatpickr-input {
    height: 32px;
    border: none;
    padding: 20px;
    padding-left: 35px;
    font-size: 12px;
    font-weight: 500;
    width: 100%;
}

.wc-ends-date-input-wrapper[data-workout-confirm-date-picker="true"] .flatpickr-calendar {
    position: static !important;
    box-shadow: none !important;
    border: none !important;
}

.wc-ends-date-input-wrapper[data-workout-confirm-date-picker="true"] .flatpickr-months .flatpickr-month {
    height: 12px;
}

.wc-ends-date-input-wrapper[data-workout-confirm-date-picker="true"] .flatpickr-day.selected,
.wc-ends-date-input-wrapper[data-workout-confirm-date-picker="true"] .flatpickr-day.selected:hover {
    background: rgba(91, 176, 189, 1) !important;
    color: white !important;
    border-color: rgba(91, 176, 189, 1) !important;
}

.wc-ends-occurrences-input {
    width: 100%;
    max-width: 90px;
    box-sizing: border-box;
}

.wc-ends-occurrences-input::-webkit-outer-spin-button,
.wc-ends-occurrences-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.wc-days-of-week {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 4px;
    flex: 1;
}

.wc-day-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid #595959;
    background-color: #fff;
    color: #6b7280;
    font-size: 12px;
    font-weight: 400;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
}

.wc-day-btn:hover {
    border-color: rgba(91, 176, 189, 1);
    color: rgba(91, 176, 189, 1);
}

.wc-day-btn--selected {
    background-color: rgba(91, 176, 189, 1);
    color: #fff;
    border-color: rgba(91, 176, 189, 1);
}

.wc-weeks-days,
.wc-months-row,
.wc-years-row {
    display: flex;
}

.wc-months-inputs,
.wc-years-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.wc-months-inputs .wc-unit-dropdown-wrapper,
.wc-years-inputs .wc-unit-dropdown-wrapper {
    width: 90px;
    flex: none;
}

.wc-option-header .wc-toggle {
    width: 27px;
    height: 16px;
    flex-shrink: 0;
    background-color: #d1d5db;
    border-radius: 9999px;
    position: relative;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.wc-option-header .wc-toggle[aria-checked='true'] {
    background-color: #4caf50;
}

.wc-notify-panel {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.wc-notify-row {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 4px;
    flex-wrap: wrap;
}

.wc-notify-option-btn {
    padding: 8px 12px;
    border-radius: 80px;
    border: 1px solid rgba(0, 0, 0, 0.3);
    background-color: #fff;
    color: #10152c;
    font-family:
        Montserrat,
        -apple-system,
        Roboto,
        Helvetica,
        sans-serif;
    font-size: 12px;
    font-weight: 400;
    line-height: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.wc-notify-option-btn:hover {
    background-color: #f8f9fa;
}

.wc-notify-option-btn--selected {
    border: 2px solid #5bb0bd;
    color: #208999;
    font-weight: 600;
}

.wc-notify-option-btn--selected:hover {
    background-color: #fff;
}

.wc-toggle-indicator {
    position: absolute;
    left: 1.5px;
    top: 1.5px;
    width: 13px;
    height: 13px;
    background-color: #fff;
    border-radius: 50%;
    transition: transform 0.2s ease;
}

.wc-option-header .wc-toggle[aria-checked='true'] .wc-toggle-indicator {
    transform: translateX(11px);
    background-color: #e8f5e9;
}

.wc-frequency-options {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.wc-frequency-btn {
    padding: 8px 12px;
    border-radius: 80px;
    border: 1px solid rgba(0, 0, 0, 0.3);
    background-color: #fff;
    color: #111827;
    font-size: 12px;
    font-weight: 400;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
}

.wc-frequency-btn:hover {
    border-color: #9ca3af;
}

.wc-frequency-btn--selected {
    border: 2px solid rgba(91, 176, 189, 1);
    background-color: #fff;
    color: rgba(32, 137, 153, 1);
    font-weight: 600;
}

/* Footer and Add to Planner button - Component 243 spec */
.wc-footer {
    flex-shrink: 0;
    padding: 16px 20px;
    background: #fff;
}

.wc-primary-button {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 8px 20px;
    gap: 4px;
    height: 42px;
    background: #5bb0bd;
    border-radius: 500px;
    flex: none;
    flex-grow: 0;
    border: none;
    cursor: pointer;
    font-family:
        'Montserrat',
        -apple-system,
        Roboto,
        Helvetica,
        sans-serif;
    font-style: normal;
    font-weight: 500;
    font-size: 14px;
    line-height: 17px;
    color: #ffffff;
    margin-top: 15px;
}

.wc-primary-button:hover {
    background-color: rgba(81, 166, 179, 1);
}

.wc-add-icon,
.wc-primary-button .add-icon {
    width: 16px;
    height: 16px;
    flex: none;
    flex-grow: 0;
    object-fit: contain;
}

.wc-primary-button-text {
    height: 17px;
    font-family:
        'Montserrat',
        -apple-system,
        Roboto,
        Helvetica,
        sans-serif;
    font-style: normal;
    font-weight: 500;
    font-size: 14px;
    line-height: 17px;
    color: #ffffff;
    flex: none;
    order: 1;
    flex-grow: 0;
    display: flex;
    align-items: center;
}

/* Drawer view base layout - same pattern as drawer-workout-detail-view and drawer-recipe-confirm-view */
.recipe-planner-drawer .drawer-workout-confirm-view {
    display: none;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

/* Drawer view visibility when showing workout confirm */
.recipe-planner-drawer.drawer-showing-workout-confirm .add-item-drawer-list-view,
.recipe-planner-drawer.drawer-showing-workout-confirm .drawer-workout-detail-view {
    display: none !important;
}

.recipe-planner-drawer.drawer-showing-workout-confirm .drawer-workout-confirm-view {
    display: flex !important;
}

.recipe-planner-drawer .drawer-workout-confirm-view .workout-confirm-drawer-content {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.recipe-planner-drawer .drawer-workout-confirm-view .wc-scrollable {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 0 0 24px;
}
