/**
 * Skip & Pause Styles for Customer Portal
 *
 * Styles for the skip renewal and pause subscription UI
 * in the WooCommerce My Account subscription view.
 *
 * @package ArraySubs
 */

.subscription-skip-pause {
  margin-top: 2em;
  padding: 12px;
  background: #fafafa;
  border: 1px solid #e0e0e0;
  border-radius: 4px;

  h3 {
    margin: 0 0 1em;
    padding: 0;
    font-size: 1.2em;
    border: none;
  }

  // Individual sections for skip and pause
  &__section {
    padding: 1em;
    margin-bottom: 1em;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 4px;

    &:last-child {
      margin-bottom: 0;
    }

    h4 {
      margin: 0 0 0.75em;
      font-size: 1em;
      color: #333;
    }
  }

  // Description text
  &__description {
    margin: 0 0 1em;
    color: #666;
    font-size: 0.9em;
  }

  // Notice messages (when action not available)
  &__notice {
    margin: 0;
    padding: 0.5em 0.75em;
    background: #f0f6fc;
    border-left: 3px solid var(--arraysubs-fb-primary-color, #0073aa);
    color: var(--arraysubs-fb-primary-color, #0073aa);
    font-size: 0.9em;
  }

  // Status boxes for active skip/pause
  &__status {
    display: flex;
    align-items: flex-start;
    gap: 1em;
    padding: 1em;
    border-radius: 4px;

    // Warning state (skipping)
    &--warning {
      background: #fcf9e8;
      border: 1px solid #e5d7a3;
    }

    // Paused state
    &--paused {
      background: #f0f0f1;
      border: 1px solid #c3c4c7;
    }
  }

  &__icon {
    font-size: 1.5em;
    line-height: 1;
    flex-shrink: 0;
  }

  &__info {
    flex: 1;

    strong {
      display: block;
      margin-bottom: 0.25em;
    }

    p {
      margin: 0;
      font-size: 0.85em;
      color: #666;
    }
  }

  // Buttons
  .button {
    margin-top: 0.5em;
    white-space: nowrap;
  }

  // Skip Next Renewal button (amber/warning tone)
  .arraysubs-skip-renewal {
    background-color: #e2a308;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
    font-weight: 500;

    &:hover {
      background-color: #ca8a04;
      color: white;
    }

    &:disabled {
      background-color: #6c757d;
      cursor: not-allowed;
    }
  }

  // Undo Skip button (outline style)
  .arraysubs-undo-skip {
    background-color: transparent;
    color: #e2a308;
    border: 1px solid #e2a308;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;

    &:hover {
      background-color: #e2a308;
      color: white;
    }

    &:disabled {
      background-color: #6c757d;
      color: white;
      border-color: #6c757d;
      cursor: not-allowed;
    }
  }

  // Pause Subscription button (blue tone)
  .arraysubs-pause-subscription {
    background-color: var(--arraysubs-fb-primary-color, #0073aa);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
    font-weight: 500;

    &:hover {
      background-color: #005177;
      color: white;
    }

    &:disabled {
      background-color: #6c757d;
      cursor: not-allowed;
    }
  }

  // Resume Now button (green/primary)
  .arraysubs-resume-subscription {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
    font-weight: 500;

    &:hover {
      background-color: #218838;
      color: white;
    }

    &:disabled {
      background-color: #6c757d;
      cursor: not-allowed;
    }
  }

  // Responsive layout
  @media (max-width: 600px) {
    padding: 1em;

    &__status {
      flex-direction: column;
      text-align: center;

      .button {
        width: 100%;
      }
    }
  }
}

// Skip Modal (reusing cancel modal styles)
#arraysubs-skip-modal,
#arraysubs-pause-modal {
  .arraysubs-modal__form {
    margin-top: 1em;
  }

  .arraysubs-modal__label {
    display: block;
    margin-bottom: 0.5em;
    font-weight: 600;
  }

  .arraysubs-modal__input {
    width: 100%;
    padding: 0.5em;
    border: 1px solid #dcdcde;
    border-radius: 4px;
    font-size: 1em;
  }

  .arraysubs-modal__select {
    width: 100%;
    padding: 0.5em;
    border: 1px solid #dcdcde;
    border-radius: 4px;
  }

  .arraysubs-modal__textarea {
    width: 100%;
    padding: 0.5em;
    border: 1px solid #dcdcde;
    border-radius: 4px;
    resize: vertical;
    min-height: 80px;
    box-sizing: border-box;
  }

  .arraysubs-modal__help-text {
    display: block;
    margin-top: 0.25em;
    font-size: 0.85em;
    color: #666;
  }
}
