:root {
    --bs-primary: #FD5902;
    --bs-secondary: #EB662D;
    
    --font-base: "Gotham", "Segoe UI", system-ui, -apple-system, sans-serif;
    --color-background: #F5F3EF;
    --color-text: #1C2831;
    --color-primary: #FD5902;
    --color-secondary: #EB662D;
    --color-accent: #FFD700;
}

.bg-mgs {
    background-color: var(--bs-primary);
}

.navbar-logo {
    height: 36px;
    width: auto;
    object-fit: contain;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--color-background);
    font-family: var(--font-base);
    color: #212121;
    line-height: 1.5;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.form-control {
    border-radius: 0.2rem;
    border: 0.8px solid var(--color-primary);
    box-shadow: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
    border-color: var(--color-secondary);
    box-shadow: 0 0 0 0.2rem rgba(235, 102, 45, 0.15);
    outline: none;
}

.form-select {
    border-radius: 0.2rem;
    border: 0.8px solid var(--color-primary);
    box-shadow: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-select:focus {
    border-color: var(--color-secondary);
    box-shadow: 0 0 0 0.2rem rgba(235, 102, 45, 0.15);
    outline: none;
}

.btn-primary {
    background-color: var(--color-primary) !important;
    border-color: var(--color-primary) !important;
    color: #fff !important;
}

.btn-primary:hover, .btn-primary:focus {
    background-color: #1e4660 !important;
    border-color: #1e4660 !important;
    color: #fff !important;
}

.btn-secondary {
    background-color: var(--color-secondary) !important;
    border-color: var(--color-secondary) !important;
    color: #fff !important;
}

.btn-secondary:hover, .btn-secondary:focus {
    background-color: #d4551a !important;
    border-color: #d4551a !important;
    color: #fff !important;
}

.card {
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: none;
}

.signature-preview {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 20px;
    min-height: 200px;
    font-family: Gotham, "Gotham", "Segoe UI", Arial, sans-serif;
    overflow: visible;
    position: relative;
}

/* Ensure Gotham is used in signature content for preview and image export */
.signature-preview .signature-content {
    font-family: Gotham, "Gotham", "Segoe UI", Arial, sans-serif;
    line-height: 1.5;
}

.signature-preview .signature-content table {
    border-collapse: separate;
    border-spacing: 0;
}

.signature-preview .signature-content td {
    vertical-align: top;
    line-height: 1.5;
}

.signature-preview table {
    border-collapse: collapse;
    width: 100%;
}

.signature-preview td {
    vertical-align: top;
}

.signature-preview .signature-content img {
    width: 120px;
    height: auto;
    max-height: 90px;
    object-fit: contain;
}

/* Custom Signature Styles */
.signature-contact {
    margin-top: 15px;
}

.contact-item {
    margin-bottom: 4px;
}

.signature-contact div {
    margin-bottom: 4px;
}

.contact-icon {
    margin-right: 8px;
    font-size: 14px;
    width: 20px;
    display: inline-block;
    text-align: center;
}

.contact-section {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
    font-size: 11px;
    color: #555;
    line-height: 1.4;
}

.contact-section strong {
    font-size: 12px;
    color: #333;
    font-weight: 600;
}

.contact-section a {
    font-size: 11px;
    color: #285A6E;
    text-decoration: none;
}

.contact-section a:hover {
    text-decoration: underline;
}

/* Preview Card Styling */
.preview-card {
    position: sticky;
    top: 20px;
    height: fit-content;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

.signature-preview {
    max-height: 400px;
    overflow-y: auto;
}

.signature-preview.empty {
    border: 2px dashed #dee2e6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
}

.signature-content {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.signature-content img[src$=".png"] {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    object-fit: contain !important;
}

/* Specific styling for logo */
.signature-content img[src*="logo-maxwell"] {
    width: 120px !important;
    height: auto !important;
    object-fit: contain !important;
    display: block !important;
}

/* Specific styling for social media icons */
.signature-content img[src*="x.png"],
.signature-content img[src*="linkdin.png"] {
    width: 24px !important;
    height: 24px !important;
    object-fit: contain !important;
    display: block !important;
}

.signature-name {
    font-size: 18px;
    font-weight: bold;
    color: var(--color-primary);
}

.signature-title {
    font-size: 14px;
    color: var(--color-secondary);
}

.signature-company {
    font-size: 14px;
    color: #666;
}

.signature-contact {
    font-size: 12px;
    color: #333;
    line-height: 1.6;
}

.contact-section {
    font-size: 11px;
    color: #555;
    line-height: 1.4;
}

.contact-section strong {
    font-size: 12px;
    color: #333;
    font-weight: 600;
}

.contact-section a {
    font-size: 11px;
    color: #285A6E;
    text-decoration: none;
}

.contact-section a:hover {
    text-decoration: underline;
}

.signature-contact a {
    color: var(--color-primary);
    text-decoration: none;
}

.signature-contact a:hover {
    text-decoration: underline;
}

.form-label {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.required {
    color: #dc3545;
}

.action-buttons {
    display: none;
}

.copy-success {
    display: none;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 10px;
    border-radius: 5px;
    margin-top: 10px;
}

.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1050;
}