/* style.css */

/* Genel Ayarlar */
html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    font-family: Inter, Arial, sans-serif;
}

body {
    display: flex;
    flex-direction: column;
}

/* Header */
header {
    background: #e96631;
    color: #fff;
    padding: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    margin: 0;
    font-size: 20px;
}

.actions {
    display: flex;
    align-items: center;  /* tüm öğeleri dikey ortala */
    gap: 8px;
}

/* Tüm butonlar için ortak stil */
.actions button {
    display: flex;
    flex-direction: column; /* sayı üstte, yazı altta */
    align-items: center;    /* yatay ortala */
    justify-content: center;/* dikey ortala */
    padding: 0 12px;        /* yatay boşluk */
    font-size: 13px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    height: 34px;           /* tüm butonlar aynı yükseklikte */
    text-align: center;
    box-sizing: border-box; /* padding dahil */
    white-space: nowrap;     /* taşmayı önle */
}

/* Renkler */
.paymentBtn {
    background-color: #4caf50;
    color: #fff;
}

.fillRateBtn {
    background-color: #333;
    color: #fff;
}

/* Doluluk oranı yazıları */
.fillRateNumbers {
    font-size: 14px;
    font-weight: bold;
    line-height: 1;
}

.fillRateText {
    font-size: 10px;
    color: #ddd;
    line-height: 1;
}

/* Grid ve Kareler */
.grid-container {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    grid-template-rows: repeat(10, 1fr);
    width: 100vw;
    height: calc(100vh - 50px);
    gap: 1px;
}

.tile {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-size: calc(0.7vw + 0.3vh);
    overflow: hidden;
    position: relative;
    cursor: pointer;
    box-sizing: border-box;
}

.tile a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #000;
    text-decoration: none;
}

.empty {
    color: #999;
    font-size: 10px;
}

.slot-num {
    position: absolute;
    top: 2px;
    right: 4px;
    font-size: 8px;
    color: rgba(0, 0, 0, 0.5);
    font-weight: 600;
}

.selected-tile {
    border: 3px solid #e96631;
    box-sizing: border-box;
}

/* Form Container */
.form-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border: 1px solid #ccc;
    padding: 15px;
    border-radius: 10px;
    width: 300px;
    z-index: 999;
    display: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.form-container h2 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

input, button, textarea {
    padding: 6px;
    border-radius: 6px;
    border: 1px solid #d6dbe6;
    font-size: 13px;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 6px;
}

button {
    background: #e96631;
    color: #fff;
    cursor: pointer;
    border: none;
}

.color-square {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 8px;
    border: 1px solid #ccc;
    cursor: pointer;
}

/* Toast Bildirimleri */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 10px 14px;
    border-radius: 8px;
    color: #fff;
    font-size: 13px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    opacity: 0;
    transform: translateY(20px);
    animation: slideIn 0.5s forwards, fadeOut 0.5s 3.5s forwards;
    z-index: 10000;
}

.toast.err { background: #e74c3c; }
.toast.ok  { background: #27ae60; }

@keyframes slideIn { to { opacity:1; transform:translateY(0); } }
@keyframes fadeOut { to { opacity:0; transform:translateY(20px); } }

/* Ödeme Modal */
#paymentModal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    width: 400px;
    max-width: 95%;
    z-index: 2000;
    display: none;
    box-shadow: 0 6px 25px rgba(0,0,0,0.25);
    font-family: Inter, Arial, sans-serif;
}

#paymentModal h2 {
    margin: 0 0 15px 0;
    font-size: 20px;
    font-weight: 600;
}

#paymentModal .close {
    position: absolute;
    top: 12px;
    right: 15px;
    cursor: pointer;
    font-size: 22px;
}

#paymentModal form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#paymentModal label {
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 4px;
}

#paymentModal input,
#paymentModal select,
#paymentModal textarea,
#paymentModal button {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    border-radius: 8px;
    border: 1px solid #ccc;
    box-sizing: border-box;
}

#paymentModal textarea {
    resize: vertical;
}

#paymentModal button {
    background-color: #e96631;
    color: #fff;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
}

#paymentModal button:hover {
    background-color: #d45b25;
}

/* Overlay */
#modalOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1500;
    display: none;
}

/* Boş kare uyarısı */
#paymentModal .alert {
    color: #e74c3c;
    font-weight: 600;
    text-align: center;
    font-size: 14px;
    margin-bottom: 10px;
}

/* Top Bar */
.top-bar {
  width: 100%;
  background-color: #222;
  color: #fff;
  text-align: center;
  font-size: 14px;
  padding: 6px 0;
  font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
  .top-bar {
    font-size: 12px;
    padding: 4px 0;
  }
}
