/* 头部工具栏样式 */
.create-header {
  ion-toolbar.warm-toolbar {
    --background: #FF8A65; /* 珊瑚橙 */
    --color: white;
    --border-width: 0;
    --min-height: 56px;
    padding: 0 12px;

    /* 返回按钮 */
    ion-buttons slot-start {
      ion-back-button.warm-back-button {
        --color: white;
        --icon-font-size: 1.5rem;
        --padding-start: 8px;
        --padding-end: 16px;
        
        ion-icon {
          color: white;
          filter: drop-shadow(0 1px 1px rgba(0,0,0,0.1));
          transition: transform 0.2s ease;
          
          &:active {
            transform: scale(0.9);
          }
        }
      }
    }

    /* 标题 */
    ion-title.warm-title {
      font-size: 1.25rem;
      font-weight: 600;
      letter-spacing: 0.5px;
      text-shadow: 0 1px 2px rgba(0,0,0,0.1);
    }

    /* 发布按钮 */
    ion-buttons slot-end {
      ion-button.warm-submit-btn {
        --background: #FF6D42; /* 红珊瑚 */
        --color: white;
        --border-radius: 24px;
        --padding-start: 20px;
        --padding-end: 20px;
        --box-shadow: 0 2px 6px rgba(255, 109, 66, 0.3);
        font-weight: 600;
        letter-spacing: 0.5px;
        transition: all 0.25s ease;
        
        &:active {
          --background: #E05C38; /* 暗色红珊瑚 */
          transform: scale(0.96);
        }
        
        &[disabled] {
          --background: #FFE0B2; /* 浅琥珀 */
          --color: #B8A99A;
          --box-shadow: none;
        }
      }
    }
  }
}

/* 内容区域样式 */
ion-content.warm-content {
  --background: #FFF8F2; /* 奶油白 */
  --padding-start: 16px;
  --padding-end: 16px;
  --padding-top: 16px;
  --padding-bottom: 16px;

  form.warm-form {
    /* 输入容器 */
    .input-container {
      position: relative;
      margin-bottom: 24px;
      background: white;
      border-radius: 12px;
      box-shadow: 0 2px 8px rgba(255, 138, 101, 0.08);
      overflow: hidden;

      ion-textarea.warm-textarea {
        --background: transparent;
        --color: #5D4037; /* 深咖啡 */
        --padding-start: 16px;
        --padding-end: 16px;
        --padding-top: 16px;
        --padding-bottom: 16px;
        font-size: 1rem;
        line-height: 1.5;
        min-height: 160px;
        
        &::placeholder {
          color: rgba(141, 110, 99, 0.6); /* 浅咖啡透明 */
          font-weight: 300;
        }
      }

      .char-counter {
        position: absolute;
        right: 12px;
        bottom: 8px;
        color: rgba(141, 110, 99, 0.7);
        font-size: 0.75rem;
        background: rgba(255, 255, 255, 0.8);
        padding: 2px 6px;
        border-radius: 10px;
      }
    }

    /* 上传区域 */
    .upload-section {
      display: flex;
      align-items: center;
      gap: 12px;
      margin-bottom: 24px;

      .hidden-input {
        display: none;
      }

      .warm-upload-btn {
        display: flex;
        align-items: center;
        padding: 12px 20px;
        background: white;
        color: #FF8A65; /* 珊瑚橙 */
        border-radius: 12px;
        border: 2px dashed #FFD7C2; /* 浅橙 */
        font-weight: 500;
        transition: all 0.2s ease;
        cursor: pointer;
        
        .btn-icon {
          margin-right: 8px;
          color: #FF6D42; /* 红珊瑚 */
          font-size: 1.3rem;
        }

        &:active {
          background: rgba(255, 204, 188, 0.2); /* 蜜桃色透明 */
          transform: scale(0.98);
        }
      }

      .hint-text {
        color: rgba(141, 110, 99, 0.7);
        font-size: 0.85rem;
        flex-grow: 1;
      }
    }

    /* 图片预览网格 */
    .warm-preview-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 10px;
      margin-top: 8px;

      .preview-card {
        position: relative;
        aspect-ratio: 1;
        border-radius: 8px;
        overflow: hidden;
        background: #F5F5F5;
        transition: transform 0.3s ease;

        .preview-img {
          width: 100%;
          height: 100%;
          object-fit: cover;
          transition: transform 0.3s ease;
        }

        .remove-btn {
          position: absolute;
          top: 6px;
          right: 6px;
          width: 24px;
          height: 24px;
          background: rgba(0, 0, 0, 0.6);
          color: white;
          border: none;
          border-radius: 50%;
          display: flex;
          align-items: center;
          justify-content: center;
          padding: 0;
          opacity: 0;
          transition: opacity 0.2s ease;
          
          ion-icon {
            font-size: 0.9rem;
          }
        }

        &:hover {
          transform: translateY(-2px);
          box-shadow: 0 4px 12px rgba(0,0,0,0.1);
          
          .remove-btn {
            opacity: 1;
          }
          
          .preview-img {
            transform: scale(1.05);
          }
        }
      }
    }
  }
}

/* 响应式调整 */
@media (max-width: 400px) {
  ion-content.warm-content {
    --padding-start: 12px;
    --padding-end: 12px;
    
    .warm-preview-grid {
      grid-template-columns: repeat(2, 1fr);
    }
  }
  
  .create-header ion-toolbar .warm-submit-btn {
    --padding-start: 16px;
    --padding-end: 16px;
  }
}