/* ========================================
   BUTTONS - Zunifikowane style przycisków dla całej aplikacji
   ======================================== */

/* ========================================
   BAZOWA KLASA PRZYCISKU
   ======================================== */
.btn {
    padding: 12px 20px;
    background: linear-gradient(135deg, #3498db 0%, #9b59b6 100%);
    color: white;
    
    border-radius: 50px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    font-family: 'Arial', sans-serif;
    box-sizing: border-box;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.btn:hover {
    background: linear-gradient(135deg, #2980b9 0%, #8e44ad 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(52, 152, 219, 0.4);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ========================================
     WARIANTY PRZYCISKÓW
     ======================================== */

/* PRIMARY - Główna akcja (gradient niebieski-fioletowy) */
.btn-primary {
    background: linear-gradient(135deg, #3498db 0%, #9b59b6 100%);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 12px 20px;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #2980b9 0%, #8e44ad 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(52, 152, 219, 0.4);
}

/* SECONDARY - Akcja drugorzędna (biały z ramką) */
.btn-secondary {
    background: white !important;
    background-image: none !important;
    color: #5c6b8a !important;
    border: 1px solid rgba(92, 107, 138, 0.3) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) !important;
    padding: 12px 20px;
  }
  
  .btn-secondary:hover:not(:disabled) {
    background: #f8f9fa !important;
    background-image: none !important;
    border-color: #5c6b8a !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1) !important;
  }

/* DANGER - Akcje destrukcyjne (biały z pomarańczową ramką) */
.btn-danger {
    background: white !important;
    background-image: none !important;
    color: #ff6b1a !important;
    border: 2px solid #ff6b1a !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) !important;
    padding: 12px 20px;
}

.btn-danger:hover:not(:disabled) {
    background: #fff5f0 !important;
    background-image: none !important;
    border-color: #ff6b1a !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1) !important;
}

/* ========================================
     WARIANTY DLA ACTION-BTN (dla kompatybilności wstecznej)
     ======================================== */

/* Bazowy action-btn */
.action-btn {
    padding: 10px 20px;
    border: none;
    border-radius: var(--border-radius-sm, 8px);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.action-btn.primary {
    background: linear-gradient(135deg, #3498db 0%, #9b59b6 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.action-btn.primary:hover {
    background: linear-gradient(135deg, #2980b9 0%, #8e44ad 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(52, 152, 219, 0.4);
}

.action-btn.secondary {
    background-color: white;
    color: #5c6b8a;
    border: 1px solid rgba(92, 107, 138, 0.3);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.action-btn.secondary:hover {
    background-color: #f8f9fa;
    border-color: #5c6b8a;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.action-btn.danger {
    background-color: white;
    color: #ff6b1a;
    border: 1px solid rgba(255, 107, 26, 0.4);
}

.action-btn.danger:hover {
    background-color: #fff5f0;
    border-color: #ff6b1a;
}
/* SUCCESS - Akcje pozytywne (biały z zieloną ramką) */
.btn-success {
    background: white !important;
    background-image: none !important;
    color: #10b981 !important;
    border: 2px solid #10b981 !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) !important;
    padding: 12px 20px;
}

.btn-success:hover:not(:disabled) {
    background: #f0fdf4 !important;
    background-image: none !important;
    border-color: #059669 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1) !important;
}
/* ========================================
     SPECJALNE WARIANTY DLA HOMEWORK
     ======================================== */

/* Przycisk "Rozwiąż z asystentem" - gradient */
.action-btn.btn-solve,
.btn-solve {
    background: linear-gradient(135deg, #3498db 0%, #9b59b6 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
    border: none;
    border-radius: 50px;
    padding: 5px 10px;
    font-size: 13px;
}

.action-btn.btn-solve:hover,
.btn-solve:hover {
    background: linear-gradient(135deg, #2980b9 0%, #8e44ad 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(52, 152, 219, 0.4);
}

/* Przyciski "Szczegóły", "Edytuj" - biały z ramką */
.action-btn.btn-view,
.action-btn.btn-edit,
.btn-view,
.btn-edit {
    background-color: white;
    border: 1px solid rgba(92, 107, 138, 0.3);
    color: #5c6b8a;
    padding: 5px 10px;
    font-size: 13px;
    border-radius: 50px;
}

.action-btn.btn-view:hover,
.action-btn.btn-edit:hover,
.btn-view:hover,
.btn-edit:hover {
    background-color: #f8f9fa;
    border-color: #5c6b8a;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Przycisk "Usuń" - biały z czerwoną ramką */
.action-btn.btn-delete,
.btn-delete {
    background-color: white;
    border: 1px solid rgba(255, 107, 26, 0.4);
    color: #ff6b1a;
    padding: 5px 10px;
    font-size: 13px;
    border-radius: 50px;
}

.action-btn.btn-delete:hover,
.btn-delete:hover {
    background-color: #fff5f0;
    border-color: #ff6b1a;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* ========================================
     WARIANTY DLA PRIMARY-BTN/SECONDARY-BTN (dla kompatybilności)
     ======================================== */

.primary-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, #3498db 0%, #9b59b6 100%);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
    text-decoration: none;
}

.primary-btn:hover {
    background: linear-gradient(135deg, #2980b9 0%, #8e44ad 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(52, 152, 219, 0.4);
}

.secondary-btn {
    padding: 10px 20px;
    background-color: white;
    color: #5c6b8a;
    border: 1px solid rgba(92, 107, 138, 0.3);
    border-radius: var(--border-radius-sm, 8px);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.secondary-btn:hover {
    background-color: #f8f9fa;
    border-color: #5c6b8a;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* ========================================
     ROZMIARY PRZYCISKÓW
     ======================================== */

/* Małe przyciski */
.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

/* Duże przyciski */
.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
}

/* ========================================
     KONTENERY PRZYCISKÓW
     ======================================== */

/* Kontener dla grupy przycisków akcji */
.action-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.buttons-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* ========================================
   SPECJALNE STYLE DLA ASYSTENTA AI
   ======================================== */

/* Przyciski wysokie - uniwersalne dla całej aplikacji */
.btn-large {
    height: 60px;
    padding: 0px 20px;
    justify-content: center;
    text-align: center;
    align-items: center;
    display: flex;
    line-height: 1.2;
}

/* Alias dla asystenta AI - dla kompatybilności wstecznej */
.btn-ai-main {
    height: 60px;
    padding: 0px 20px;
    justify-content: center;
    text-align: center;
    align-items: center;
    display: flex;
    line-height: 1.2;
    border: none;
    outline: none;
}

/* Specjalny kolor obramówki dla secondary w AI */
.btn-ai-main.btn-secondary {
    border-color: #4DB2A8 !important;
}

.btn-ai-main.btn-secondary:hover {
    border-color: #3d9e95 !important;
}

/* Przycisk Historia rozmów - pełna szerokość */
.btn-ai-history {
    width: 100%;
    height: 60px;
    justify-content: center;
    text-align: center;
    margin-top: 15px;
    align-items: center;
}

/* ========================================
   SPECJALNE STYLE DLA SUBJECTS
   ======================================== */

/* Mini przyciski - mniejsze niż standardowe */
.btn-mini {
    padding: 8px 16px;
    font-size: 13px;
}

/* Secondary z zieloną obramówką (dla przycisków Nowy, Wszystkie, Biblioteka) */
.btn-secondary-green {
    background: white !important;
    background-image: none !important;
    color: #5c6b8a !important;
    border: 2px solid #4DB2A8 !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) !important;
    padding: 8px 16px;
    font-size: 13px;
    border-radius: 50px;
}

.btn-secondary-green:hover:not(:disabled) {
    background: #f8f9fa !important;
    background-image: none !important;
    border-color: #3d9e95 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1) !important;
}

/* Kontener dla przycisków akcji w subjects */
.subject-actions-container {
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
    padding: 0 10px;
    flex-wrap: wrap;
  }
  
  @media (max-width: 768px) {
    .subject-actions-container {
      gap: 8px;
      padding: 0 5px;
    }
  }
  
  @media (max-width: 480px) {
    .subject-actions-container {
      gap: 6px;
    }
  }

/* ========================================
     RESPONSYWNOŚĆ
     ======================================== */

@media (max-width: 768px) {

    .btn,
    .btn-primary,
    .btn-secondary {
        padding: 10px 18px;
        font-size: 13px;
    }
    
    .btn-danger {
        padding: 10px 18px;
        font-size: 13px;
        border: 2px solid #ff6b1a !important;
    }

    .action-btn,
    .primary-btn,
    .secondary-btn {
        padding: 8px 16px;
        font-size: 13px;
    }

    .btn-sm {
        padding: 6px 12px;
        font-size: 12px;
    }

    .action-buttons,
    .buttons-group {
        gap: 8px;
    }
    /* Wyjątki dla przycisków AI */
    .btn-ai-main {
        height: 50px !important;
        padding: 0px 20px !important;
        font-size: 13px !important;
    }
    
    .btn-ai-history {
        height: 50px !important;
    }
}

@media (max-width: 480px) {

    .btn,
    .btn-primary,
    .btn-secondary {
        padding: 10px 16px;
        font-size: 12px;
    }
    
    .btn-danger {
        padding: 10px 16px;
        font-size: 12px;
        border: 2px solid #ff6b1a !important;
    }

    .action-btn,
    .primary-btn,
    .secondary-btn {
        padding: 8px 14px;
        font-size: 12px;
    }

    .action-buttons,
    .buttons-group {
        gap: 6px;
    }
    /* Wyjątki dla przycisków AI */
    .btn-ai-main {
        height: 48px !important;
        padding: 0px 20px !important;
        font-size: 12px !important;
    }
    
    .btn-ai-history {
        height: 48px !important;
    }
}