/* index.css */

/* Background gradient */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #a8edea, #fed6e3);
    min-height: 100vh;
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    padding-left: 20px;
}

/* Main container grid */
.container {
    display: grid;
    grid-template-columns: 1.3fr 1.5fr;
    gap: 30px;
    max-width: 1400px;
    margin: 30px auto;
    padding: 20px 380px 20px 20px;
    width: 100%;
    box-sizing: border-box;
}

/* Card style */
.card {
    background: transparent;
    border-radius: 15px;
    box-shadow: none;
    padding: 30px 25px;
    display: flex;
    flex-direction: column;
}

h2 {
    font-size: 1.6rem;
    margin-bottom: 25px;
    color: #4b3b65;
}

/* Input and textarea styles */
input[type="text"], select, textarea {
    width: 100%;
    padding: 14px 12px;
    font-size: 1.1rem;
    border-radius: 10px;
    border: 1px solid #ccc;
    margin-bottom: 15px;
    box-sizing: border-box;
    font-family: inherit;
    color: #4b3b65;
    outline: none;
    transition: border-color 0.3s ease;
}

input[type="text"]:focus, select:focus, textarea:focus {
    border-color: #7e6cc9;
}

textarea {
    min-height: 100px;
    resize: vertical;
}

/* Buttons */
button {
    font-size: 1.05rem;
    padding: 12px 25px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    color: white;
    background-color: #7e6cc9;
    transition: background-color 0.3s ease;
    margin-right: 10px;
}
button:hover {
    background-color: #6453b6;
}
.btn-red {
    background-color: #e0716e;
}
.btn-red:hover {
    background-color: #c75a57;
}
.btn-blue {
    background-color: #7e6cc9;
}
.btn-blue:hover {
    background-color: #6453b6;
}

/* Suggestions list */
#suggestions-list {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 20px;
    background-color: #fafafa;
}
#suggestions-list div {
    padding: 10px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    color: #4b3b65;
    border-radius: 6px;
}
#suggestions-list div:hover {
    background-color: #f0e9ff;
}
#suggestions-list div.selected {
    background-color: #d4cfff;
}

/* Suggestion display */
#suggestion-content p {
    color: #4b3b65;
    font-size: 1.1rem;
    margin: 0 0 8px 0;
}

/* Comments container */
#comments-container {
    display: flex;
    flex-direction: column;
    height: 300px;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 15px;
    background-color: #fafafa;
    box-sizing: border-box;
}

/* Comments scroll area */
#comments {
    flex-grow: 1;
    overflow-y: auto;
    font-size: 1rem;
    color: #4b3b65;
}
#comments p {
    margin: 8px 0;
}

/* Inputs fixed at bottom */
#comment-inputs {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

#comment-username, #comment-text {
    flex-grow: 1;
    padding: 8px;
    font-size: 1rem;
    border-radius: 6px;
    border: 1px solid #ccc;
}

#comment-text {
    flex-grow: 2;
}

#comment-add-button {
    white-space: nowrap;
    padding: 8px 16px;
    border: none;
    background: #7e6cc9;
    color: white;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
#comment-add-button:hover {
    background-color: #6453b6;
}

/* Center welcome card text */
.container > .card:nth-child(2) {
    text-align: center;
    justify-content: flex-start;
    align-self: start;
    margin-top: -20px;
    color: #4b3b65;

    background: none;
    box-shadow: none;
}
.container > .card:nth-child(2) p {
    font-size: 1.15rem;
    margin: 15px 0 30px 0;
}
.container > .card:nth-child(2) h2 {
    margin-bottom: 10px;
}
.container > .card:nth-child(2) span {
    color: #7e6cc9;
    font-weight: bold;
}
.container > .card:nth-child(2) p strong {
    color: #e0716e;
}

/* Buttons in center card */
.center-buttons {
    display: flex;
    justify-content: center;
    gap: -10px;
    flex-wrap: nowrap;
}


/* Chat Section */
.chat-box {
    position: fixed;
    top: 50px;
    right: 0;
    width: 300px;
    height: 100vh;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: -3px 0 10px rgba(0, 0, 0, 0.1);
    border-radius: 0;
    overflow: hidden;
    z-index: 1000;
}

.chat-box iframe {
    width: 100%;
    height: 100%;
    border: none;
    background-color: transparent;
}

/* Responsive */
@media (max-width: 900px) {
    .container {
        display: flex;
        flex-direction: column;
        padding: 10px;
        max-width: 100%;
    }
    .center-buttons button {
        min-width: auto;
        width: 100%;
        margin: 10px 0;
    }
    .container > .card:nth-child(2) {
        text-align: center;
        order: 1;
    }
    .container > .card:nth-child(1) {
        order: 2;
    }
}


/* Hide chat box by default on mobile */
@media (max-width: 600px) {
  .chat-box {
    display: none;
    width: 100vw;
    height: 100vh;
    position: fixed;
    top: 0;
    right: 0;
    z-index: 10000;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
  }
  /* Show the toggle button */
  #chat-toggle-btn {
    display: block;
    position: fixed;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #7e6cc9;
    color: white;
    border: none;
    padding: 12px 20px;
    font-size: 1rem;
    border-radius: 30px;
    cursor: pointer;
    z-index: 11000;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  }
}

/* Hide toggle button on desktop */
#chat-toggle-btn {
  display: none;
}