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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    background: #f8fafc;
    color: #1e293b;
}

/* Container layouts */
.container {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 2rem;
}

/* Split layout for survey page */
#surveyContainer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    min-height: 100vh;
    padding: 2rem;
}

#pageContent {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

#pageContent form {
    grid-column: 1;
    height: fit-content;
}

#pageContent iframe {
    grid-column: 2;
    border: none;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}

/* Form styling */
form {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #334155;
}

input[type="text"],
textarea,
select {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 1.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

input[type="text"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgb(59 130 246 / 0.1);
}

/* Button styles */
button {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    background-color: #3b82f6;
    color: white;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

button:hover {
    background-color: #2563eb;
}

button:disabled {
    background-color: #94a3b8;
    cursor: not-allowed;
}

#navigation {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

/* Survey list styling */
#surveyList {
    list-style: none;
    display: grid;
    gap: 1rem;
}

/* #surveyList li {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #3b82f6;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
} */

/* Action buttons */
.edit-btn, .delete-btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    border-radius: 4px;
}

.edit-btn {
    background-color: #3b82f6;
}

.delete-btn {
    background-color: #ef4444;
}

.delete-btn:hover {
    background-color: #dc2626;
}

/* Page groups and components */
.page-group {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: white;
}

.components-container {
    margin-top: 1rem;
}

.component {
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    margin-bottom: 1rem;
    padding: 1rem;
    background: #f8fafc;
}

.add-component-btn, 
.remove-page-btn, 
.remove-component-btn, 
.add-option-btn {
    padding: 0.5rem 1rem;
    margin-right: 0.5rem;
    font-size: 0.875rem;
}

.add-component-btn,
.add-option-btn {
    background-color: #10b981;
}

.add-component-btn:hover,
.add-option-btn:hover {
    background-color: #059669;
}

.remove-page-btn,
.remove-component-btn {
    background-color: #ef4444;
}

.remove-page-btn:hover,
.remove-component-btn:hover {
    background-color: #dc2626;
}

.dropdown-option {
    margin-top: 0.5rem;
    width: calc(100% - 1rem);
}

/* Responsive design */
@media (max-width: 1024px) {
    #surveyContainer {
        grid-template-columns: 1fr;
    }
    
    #pageContent {
        grid-template-columns: 1fr;
    }
    
    #pageContent iframe {
        grid-column: 1;
        height: 400px;
    }
}

@media (max-width: 640px) {
    .container {
        padding: 1rem;
    }
    
    form {
        padding: 1rem;
    }
    
    #surveyList li {
        flex-direction: column;
        gap: 1rem;
    }
}

/* Add these new styles to your existing styles.css */

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.create-btn {
    background-color: #10b981;
    color: white;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.create-btn:hover {
    background-color: #059669;
}

.survey-info {
    flex: 1;
}

.survey-name {
    font-size: 1.1rem;
    font-weight: 500;
    color: #1e293b;
}

.survey-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.view-btn {
    background-color: #6366f1;
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.875rem;
    transition: background-color 0.2s ease;
}

.view-btn:hover {
    background-color: #4f46e5;
}

#surveyList {
    margin-top: 2rem;
}

#surveyList > li {
    background: white;
    padding: 1rem 1.5rem;
    height: 88px;
    border-left: 4px solid #3b82f6;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.edit-btn, .delete-btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.edit-btn {
    background-color: #3b82f6;
}

.edit-btn:hover {
    background-color: #2563eb;
}

.delete-btn {
    background-color: #ef4444;
}

.delete-btn:hover {
    background-color: #dc2626;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
}

.url-display {
    padding: 0.75rem;
    background: #f1f5f9;
    border-radius: 4px;
    margin: 1rem 0;
    word-break: break-all;
}

.copy-btn {
    background-color: #3b82f6;
    margin-top: 1rem;
}

.close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    cursor: pointer;
    font-size: 1.5rem;
}

.survey-list-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
}