/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    background: #f0f0f0;
    color: #333;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: auto;
}

/* Header */
header {
    background: #304050;
    color: #fff;
    padding: 15px 0;
    overflow: hidden;
}

header .logo {
    float: left;
    font-size: 1.5em;
    font-weight: bold;
}

header nav {
    float: left;
    margin-left: 50px;
}

header nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

header nav a {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
}

header nav a:hover {
    color: #ffcc00;
}

.btn-login {
    float: right;
    background: #3080c0;
    color: #fff;
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    transition: background 0.3s;
}

.btn-login:hover {
    background: #206090;
}

/* Hero */
.hero {
    background: #506070;
    color: #fff;
    text-align: center;
    padding: 80px 20px;
}

.hero h1 {
    font-size: 2.5em;
    margin-bottom: 15px;
}

.hero .discount {
    font-size: 1.2em;
    background: #3080c0;
    padding: 10px;
    border-radius: 5px;
    display: inline-block;
}

/* Features */
.features {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin: 40px 0;
}

.feature-box {
    flex: 1 1 30%;
    background: #fff;
    margin: 10px;
    padding: 20px;
    text-align: center;
    border-radius: 8px;
    box-shadow: 0 0 5px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.feature-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Plans (index + dedicated) */
.plans, .dedicated {
    text-align: center;
    padding: 50px 0;
    background: #fff;
}

.plans h2, .dedicated h2 {
    margin-bottom: 30px;
    color: #304050;
}

.plan {
    display: inline-block;
    background: #f9f9f9;
    margin: 15px;
    padding: 25px;
    width: 270px;
    border-radius: 10px;
    box-shadow: 0 0 5px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.plan:hover {
    transform: translateY(-8px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.2);
}

.plan h3 {
    color: #3080c0;
    margin-bottom: 10px;
    font-size: 1.3em;
}

.plan p {
    font-size: 0.95em;
    margin-bottom: 20px;
}

.btn {
    display: inline-block;
    background: #3080c0;
    color: #fff;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    transition: background 0.3s, transform 0.2s;
}

.btn:hover {
    background: #206090;
    transform: scale(1.05);
}

/* Contact Form */
.contact {
    background: #fff;
    padding: 40px 20px;
    border-radius: 8px;
    margin: 30px 0;
    box-shadow: 0 0 8px rgba(0,0,0,0.1);
}

.contact h2 {
    margin-bottom: 20px;
    color: #304050;
    text-align: center;
}

.contact form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact label {
    font-weight: bold;
    margin-bottom: 5px;
}

.contact input, 
.contact textarea {
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1em;
    width: 100%;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.contact input:focus, 
.contact textarea:focus {
    border-color: #3080c0;
    box-shadow: 0 0 5px rgba(48,128,192,0.3);
    outline: none;
}

.contact textarea {
    min-height: 120px;
    resize: vertical;
}

.contact .btn {
    background: #3080c0;
    color: #fff;
    padding: 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1em;
    transition: background 0.3s, transform 0.2s;
}

.contact .btn:hover {
    background: #206090;
    transform: scale(1.03);
}

.success {
    color: green;
    font-weight: bold;
    margin-bottom: 15px;
    text-align: center;
}

.error {
    color: red;
    font-weight: bold;
    margin-bottom: 15px;
    text-align: center;
}

/* Footer */
footer {
    background: #304050;
    color: #fff;
    text-align: center;
    padding: 20px;
    margin-top: 40px;
}

/* Responsive */
@media (max-width: 768px) {
    header nav ul {
        flex-direction: column;
        margin-top: 10px;
    }
    .features {
        flex-direction: column;
    }
    .feature-box {
        flex: 1 1 100%;
    }
    .plan {
        width: 90%;
    }
}

/* Ogólny kontener panelu */
.user-panel {
    display: flex;
    gap: 20px;
    margin: 30px auto;
    max-width: 1200px;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

/* Sidebar */
.sidebar {
    width: 250px;
    background: #f8f9fa;
    border-right: 1px solid #ddd;
    padding: 20px;
    border-radius: 8px 0 0 8px;
}

.sidebar h3 {
    margin-bottom: 15px;
    font-size: 1.2em;
    color: #304050;
}

.sidebar ul {
    list-style: none;
    padding: 0;
}

.sidebar ul li {
    margin-bottom: 10px;
}

.sidebar ul a {
    display: block;
    padding: 10px;
    border-radius: 5px;
    text-decoration: none;
    color: #304050;
    font-weight: bold;
    transition: background 0.3s, color 0.3s;
}

.sidebar ul a:hover,
.sidebar ul a.active {
    background: #3080c0;
    color: #fff;
}

/* Główna treść */
.panel-content {
    flex: 1;
    padding: 20px 30px;
}
.panel-content h2 {
    margin-bottom: 15px;
}

/* Formularz ustawień */
.settings-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 400px;
}
.settings-form input,
.settings-form select {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
}
.settings-form img {
    display: block;
}

/* Dedicated servers table */
.dedicated {
    background: #fff;
    padding: 40px 20px;
    border-radius: 8px;
    margin: 30px 0;
    box-shadow: 0 0 8px rgba(0,0,0,0.1);
}

.dedicated-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.dedicated-table th, .dedicated-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #ddd;
    text-align: center;
}

.dedicated-table th {
    background: #304050;
    color: #fff;
}

.in-stock {
    color: green;
    font-weight: bold;
}
.out-stock {
    color: red;
    font-weight: bold;
}

/* Cart */
.cart-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}
.cart-table th, .cart-table td {
    padding: 12px;
    border-bottom: 1px solid #ddd;
    text-align: center;
}
.cart-table th {
    background: #304050;
    color: #fff;
}
.cart-summary {
    margin-top: 30px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    text-align: right;
    font-size: 1.2em;
}

.cart, .checkout {
    margin: 40px auto;
    max-width: 1000px;
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 0 8px rgba(0,0,0,0.1);
}

.configure .server-box {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 5px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.config-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrapper input {
    flex: 1;
    padding-right: 40px;
}

.toggle-password {
    position: absolute;
    right: 10px;
    cursor: pointer;
    user-select: none;
}

.strength-bar {
    height: 6px;
    margin-top: 5px;
    border-radius: 3px;
    background: transparent;
    transition: width 0.3s, background 0.3s;
}

/* Pasek siły hasła */
.strength-bar {
    height: 6px;
    background: #ddd;
    margin-top: 5px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

/* Komunikat o zgodności */
#password-match {
    margin-top: 6px;
    font-size: 0.9em;
}

/* Galeria */
/* Miniatury */
.attachment-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.thumb-wrapper {
    position: relative;
    display: inline-block;
}

.thumb-wrapper img {
    max-width: 150px;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: transform 0.2s ease;
    cursor: pointer;
}

.thumb-wrapper:hover img {
    transform: scale(1.03);
    box-shadow: 0 0 8px rgba(0,0,0,0.3);
}

/* Ikona lupy */
.zoom-icon {
    position: absolute;
    top: 20px;
    right: 60px;
    font-size: 20px;
    color: white;
    background: rgba(0,0,0,0.6);
    border-radius: 50%;
    padding: 3px 6px;
    opacity: 0;
    transition: opacity 0.2s;
}

.thumb-wrapper:hover .zoom-icon {
    opacity: 1;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    justify-content: center;
    align-items: center;
}

.lightbox-content {
    text-align: center;
}

.lightbox img {
    max-width: 90%;
    max-height: 80vh;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0,0,0,0.5);
    animation: fadeIn 0.3s ease;
}

.lightbox .close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: white;
    font-size: 40px;
    cursor: pointer;
}

.lightbox-controls {
    margin-top: 15px;
}

.lightbox-controls .nav {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    padding: 8px 15px;
    border-radius: 6px;
    font-size: 16px;
    margin: 0 10px;
    cursor: pointer;
    transition: background 0.2s;
}

.lightbox-controls .nav:hover {
    background: rgba(255,255,255,0.25);
}

@keyframes fadeIn {
    from {opacity: 0; transform: scale(0.98);}
    to {opacity: 1; transform: scale(1);}
}

/* ---- Ticket Attachments Drag&Drop ---- */
.attachments-box {
    border: 2px dashed #bbb;
    border-radius: 6px;
    padding: 10px;
    text-align: center;
    color: #666;
    background: #fafafa;
    margin-top: 10px;
    transition: background 0.3s, border-color 0.3s;
}

.attachments-box.dragover {
    background: #eef9ff;
    border-color: #4da3ff;
}

#attachment-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
    justify-content: center;
}

.preview-item {
    position: relative;
    display: inline-block;
}

.preview-item img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.preview-item .remove-btn {
    position: absolute;
    top: -5px;
    right: -5px;
    background: rgba(0,0,0,0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

/* Fix dla wysokości edytora Trumbowyg */
.trumbowyg-editor {
    min-height: 260px !important;
    max-height: 400px !important;
    overflow-y: auto !important;
    padding: 10px;
    border-radius: 4px;
    background: #fff;
}

.trumbowyg-box {
    border: 1px solid #ccc;
    border-radius: 6px;
    box-shadow: 0 0 5px rgba(0,0,0,0.1);
}

.ticket-reply {
    text-align: center;
    margin-top: 15px;
}

.ticket-reply button.btn {
    margin-bottom: 10px;
}

/* Styl w edytorze — aby było widać efekt natychmiast */
.trumbowyg-editor blockquote {
      border-left: 4px solid #3080c0;
      padding: 10px 15px;
      margin: 10px 0;
      background: #f7f9fc;
      font-style: italic;
    }
    .trumbowyg-editor pre {
      background: #2b2b2b;
      color: #f5f5f5;
      padding: 10px 12px;
      border-radius: 6px;
      font-family: "Fira Code", Consolas, monospace;
      line-height: 1.5;
      overflow-x: auto;
    }

/* Wysłane wiadomości — ten sam efekt */
.ticket-message blockquote {
    border-left: 4px solid #3080c0;
    background: #f8f9fa;
    color: #444;
    padding: 10px 15px;
    margin: 10px 0;
    font-style: italic;
}

.ticket-message pre {
    background: #2b2b2b;
    color: #eee;
    padding: 10px;
    border-radius: 6px;
    font-family: "Fira Code", Consolas, monospace;
    overflow-x: auto;
    white-space: pre-wrap;
}

.trumbowyg-editor blockquote::before {
    content: "❝";
    color: #3080c0;
    font-size: 1.5em;
    margin-right: 6px;
}
.trumbowyg-editor pre::before {
    content: "</>";
    color: #ffcc00;
    margin-right: 8px;
    font-weight: bold;
}

.trumbowyg-button-pane button span.trumbowyg-text-button {
  display: inline !important;
  font-size: 15px;
  line-height: 1;
}
