/* Main Styles - Form Builder Pro */
:root {
    --primary-color: #4361ee;
    --secondary-color: #3f37c9;
    --success-color: #4cc9f0;
    --danger-color: #f72585;
    --warning-color: #f8961e;
    --info-color: #90e0ef;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --border-color: #dee2e6;
    --sidebar-bg: #f8f9fa;
    --header-height: 64px;
    --sidebar-width: 280px;
    --body-bg: #f5f7f9;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--body-bg);
    color: var(--dark-color);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header */
.app-header {
    background-color: #fff;
    border-bottom: 1px solid var(--border-color);
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.branding {
    display: flex;
    flex-direction: column;
}

.branding h1 {
    font-size: 1.5rem;
    margin: 0;
    font-weight: 600;
    color: var(--primary-color);
}

.branding p {
    font-size: 0.8rem;
    margin: 0;
    color: #6c757d;
}

.main-nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-nav li {
    margin: 0 15px;
}

.main-nav a {
    text-decoration: none;
    color: #495057;
    font-weight: 500;
    padding: 8px 0;
    position: relative;
    transition: color 0.3s;
}

.main-nav a:hover {
    color: var(--primary-color);
}

.main-nav a.active {
    color: var(--primary-color);
}

.main-nav a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 3px 3px 0 0;
}

.user-menu {
    display: flex;
    align-items: center;
}

.user-profile {
    display: flex;
    align-items: center;
    margin-left: 20px;
    cursor: pointer;
}

.user-profile img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 10px;
}

/* Main Content */
.app-main {
    flex: 1;
    padding: 20px;
}

/* Sidebar Element */
.element-sidebar {
    background-color: var(--sidebar-bg);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 0;
    height: calc(100vh - var(--header-height) - 40px);
    position: sticky;
    top: calc(var(--header-height) + 20px);
    overflow-y: auto;
}

.sidebar-header {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.elements-container {
    padding: 15px;
}

.element-group {
    margin-bottom: 20px;
}

.element-group h4 {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.element-items {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.element-item {
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.element-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 3px 8px rgba(67, 97, 238, 0.15);
    transform: translateY(-2px);
}

.element-item i {
    font-size: 1.5rem;
    margin-bottom: 8px;
    color: var(--primary-color);
}

.element-item span {
    font-size: 0.85rem;
    font-weight: 500;
}

/* Form Builder Area */
.form-builder-area {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    height: calc(100vh - var(--header-height) - 40px);
    overflow-y: auto;
    position: relative;
    padding: 0;
}

.form-builder-header {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.form-title {
    border: none;
    background: transparent;
    font-size: 1.3rem;
    font-weight: 600;
    width: 60%;
    padding: 5px;
    border-radius: 4px;
}

.form-title:focus {
    outline: none;
    background-color: #f8f9fa;
}

.form-header-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.form-builder-content {
    padding: 20px;
    min-height: 500px;
}

.form-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    color: #adb5bd;
    text-align: center;
}

.form-empty-state img {
    width: 120px;
    height: 120px;
    opacity: 0.5;
    margin-bottom: 20px;
}

.form-empty-state h3 {
    margin-bottom: 10px;
    font-weight: 600;
}

/* Properties Panel */
.properties-panel {
    background-color: var(--sidebar-bg);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    height: calc(100vh - var(--header-height) - 40px);
    overflow-y: auto;
    position: sticky;
    top: calc(var(--header-height) + 20px);
    padding: 0;
}

.panel-header {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
}

.panel-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.properties-content {
    padding: 15px;
}

.properties-empty-state {
    padding: 20px;
    text-align: center;
    color: #adb5bd;
}

.form-settings {
    padding: 15px;
    border-top: 1px solid var(--border-color);
    margin-top: 15px;
}

.form-settings-tab h4 {
    font-size: 1rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.form-setting-group {
    margin-bottom: 15px;
}

.form-setting-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Form Elements Styles */
.form-element {
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
    position: relative;
    transition: all 0.2s;
}

.form-element:hover {
    border-color: var(--primary-color);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
}

.form-element.selected {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(67, 97, 238, 0.2);
}

.element-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 5px;
    opacity: 0;
    transition: opacity 0.2s;
}

.form-element:hover .element-actions {
    opacity: 1;
}

.element-action-btn {
    width: 28px;
    height: 28px;
    border-radius: 4px;
    background-color: #f8f9fa;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.element-action-btn:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.form-element-label {
    margin-bottom: 8px;
    font-weight: 500;
}

.form-element-description {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 10px;
}

/* Rule Builder Modal */
.rule-condition-container, .rule-action-container {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    align-items: center;
}

/* Signature Pad */
.signature-pad-container {
    border: 1px dashed var(--border-color);
    border-radius: 6px;
    background-color: #f8f9fa;
    position: relative;
    height: 150px;
    margin-bottom: 10px;
}

.signature-pad-container canvas {
    width: 100%;
    height: 100%;
}

.signature-pad-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Form Elements - Matrix */
.matrix-table {
    width: 100%;
    border-collapse: collapse;
}

.matrix-table th, .matrix-table td {
    border: 1px solid var(--border-color);
    padding: 8px;
    text-align: center;
}

.matrix-table th {
    background-color: #f8f9fa;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .element-items {
        grid-template-columns: 1fr;
    }
    
    .main-nav {
        display: none;
    }
    
    .form-builder-area {
        height: auto;
    }
    
    .properties-panel, .element-sidebar {
        height: auto;
        position: static;
    }
}

/* Drag and Drop Interaction */
.dragging {
    opacity: 0.5;
}

.drag-over {
    border: 2px dashed var(--primary-color);
    background-color: rgba(67, 97, 238, 0.05);
}

/* Animation for new elements */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.form-element-new {
    animation: fadeIn 0.3s ease-out;
} 