/* Nowoczesne style dla modalu Create New Topic */
.modal {
  display: none;
}

.modal.is-active {
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
}

.modal-background {
  background-color: rgba(14, 14, 18, 0.85);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backdrop-filter: blur(5px);
}

.modal-card {
  position: relative;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  border-radius: 8px;
  overflow: hidden;
  background-color: #1e1e1e;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  border: 1px solid #333333;
  animation: modalSlideIn 0.3s ease-out;
}

.modal-card-head {
  background-color: #121212;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #333333;
}

.modal-card-title {
  color: #ffffff;
  font-size: 1.25rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-card-title::before {
  content: '+';
  font-size: 1.4rem;
  color: #7289da;
}

.delete {
  background-color: transparent;
  border: none;
  color: #888888;
  cursor: pointer;
  font-size: 1.5rem;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.delete:hover {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.1);
}

.modal-card-body {
  padding: 20px;
  background-color: #1e1e1e;
}

.field {
  margin-bottom: 16px;
}

.label {
  color: #cccccc;
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 8px;
}

.input, .textarea {
  width: 100%;
  padding: 10px 12px;
  background-color: #2a2a2a;
  border: 1px solid #444444;
  border-radius: 4px;
  color: #ffffff;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.input:focus, .textarea:focus {
  outline: none;
  border-color: #7289da;
  box-shadow: 0 0 0 2px rgba(114, 137, 218, 0.2);
}

.textarea {
  min-height: 120px;
  resize: vertical;
}

.modal-card-foot {
  background-color: #121212;
  padding: 16px 20px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid #333333;
  position: relative;
}

/* Button container for horizontal layout */
.modal-card-foot .button-container {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

/* Styling for attachment button in modal */
.modal-card-foot .attachment-button {
  position: relative;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background-color: #9a28fb;
  border: none;
  color: white;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.modal-card-foot .attachment-button:hover {
  background-color: #8628d3;
  transform: scale(1.1);
}

.modal-card-foot .attachment-button:active {
  transform: scale(0.95);
}

/* Adjust spacing for better visual alignment */
.modal-card-foot .button-container .button.is-primary {
  margin-left: 5px;
}

.modal-card-foot .button-container .button:not(.is-primary) {
  margin-left: auto; /* Push Cancel button to the right */
}

.button {
  cursor: pointer;
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 0.95rem;
  font-weight: 500;
  border: none;
  transition: all 0.2s ease;
}

.button.is-primary {
  background-color: #7289da;
  color: white;
}

.button.is-primary:hover {
  background-color: #5b6eae;
}

.button:not(.is-primary) {
  background-color: #2c2c2c;
  color: #cccccc;
}

.button:not(.is-primary):hover {
  background-color: #3a3a3a;
}

.button.is-success {
  background-color: #48c774;
  border-color: #48c774;
  color: #fff;
}

.button.is-success:hover {
  background-color: #3ec46d;
  border-color: #3ec46d;
}

.button.is-info {
  background-color: #3298dc;
  border-color: #3298dc;
  color: #fff;
}

.button.is-info:hover {
  background-color: #2793da;
  border-color: #2793da;
}

.button.is-light {
  background-color: #f5f5f5;
  border-color: #dbdbdb;
  color: #363636;
}

.button.is-light:hover {
  background-color: #eeeeee;
  border-color: #dbdbdb;
}

/* Loading state for buttons */
.button.is-loading {
  color: transparent !important;
  pointer-events: none;
}

.button.is-loading::after {
  animation: spinAround 0.5s infinite linear;
  border: 2px solid #dbdbdb;
  border-radius: 50%;
  border-right-color: transparent;
  border-top-color: transparent;
  content: "";
  display: block;
  height: 1em;
  position: absolute;
  left: calc(50% - 0.5em);
  top: calc(50% - 0.5em);
  width: 1em;
}

@keyframes spinAround {
  from { transform: rotate(0deg); }
  to { transform: rotate(359deg); }
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Stylizacja przycisku Submit i Cancel dla lepszej spójności */
#submit {
  background-color: #7289da;
  color: white;
  font-weight: 500;
}

#submit:hover {
  background-color: #5b6eae;
}

#cancel {
  background-color: transparent;
  border: 1px solid #444444;
  color: #cccccc;
}

#cancel:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

/* Styles for the Add More button */
.add-more-btn {
  margin-right: auto; /* Push it to the left of Cancel button */
  background-color: #4a5568 !important; 
  transition: all 0.2s ease;
}

.add-more-btn:hover {
  background-color: #2d3748 !important;
  transform: translateY(-2px);
}

.add-more-btn .icon {
  margin-right: 4px;
}

/* Attachment preview styles */
.attachment-preview {
    margin-top: 10px;
    padding: 10px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    border: 1px solid #444;
}

.attachment-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
    padding: 5px;
    background-color: rgba(255, 255, 255, 0.03);
    border-radius: 3px;
}

.attachment-item:last-child {
    margin-bottom: 0;
}

.attachment-item .icon {
    color: #7289da;
}

.attachment-item .delete {
    margin-left: auto;
}
