/* App Manifest Generator Tool - CSS Estilos Prontos */

:root {
    --amg-transition: all 0.3s ease;
    --amg-border-radius: 10px;
    --amg-border-radius-lg: 20px;
    --amg-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    --amg-shadow-hover: 0 20px 40px rgba(0, 0, 0, 0.12);
}

/* ============================================
   HEADER SECTION
============================================ */
.amg-header {
    background: linear-gradient(135deg, #2563eb 0%, var(--color-secundary, #1e40af) 100%);
    color: #ffffff;
    padding: 4rem 0 2rem;
    margin-bottom: 0;
    position: relative;
    overflow: hidden;
    width: 100%;
    float: left;
}

.amg-header nav {
    width: 100%;
    float: left;
}

.amg-header nav ol.breadcrumb {
    width: 100%;
    float: left;
    display: flex;
    flex-wrap: nowrap;
    overflow: hidden;
    overflow-y: auto;
    margin-bottom: 0;
    padding: 0;
    list-style: none;
}

.amg-header nav ol.breadcrumb .breadcrumb-item {
    width: auto;
    float: left;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    white-space: nowrap;
}

.amg-header nav ol.breadcrumb .breadcrumb-item a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.amg-header nav ol.breadcrumb .breadcrumb-item a:hover {
    color: #ffffff;
}

.amg-header nav ol.breadcrumb .breadcrumb-item.active {
    color: #ffffff;
}

.amg-header nav ol.breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.6);
    content: "/";
    padding: 0 0.5rem;
}

.amg-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    color: #ffffff;
}

.amg-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 300;
    color: #ffffff;
    max-width: 800px;
    margin: 0 auto 1.5rem auto;
}

/* ============================================
   MAIN SECTION
============================================ */
.amg-main {
    width: 100%;
    float: left;
    padding: 40px 0 60px;
    background-color: #f8fafc;
}

/* ============================================
   FORM WRAPPER
============================================ */
.amg-form-wrapper {
    background: #ffffff;
    border-radius: var(--amg-border-radius-lg);
    padding: 40px;
    box-shadow: var(--amg-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e2e8f0;
}

.amg-form-wrapper:hover {
    box-shadow: var(--amg-shadow-hover);
}

/* ============================================
   FORM SECTIONS
============================================ */
.amg-section-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f1f5f9;
    display: flex;
    align-items: center;
    gap: 10px;
}

.amg-section-title i {
    color: var(--color-primary, #2563eb);
    font-size: 1.1rem;
}

.amg-form-section {
    margin-bottom: 30px;
}

.amg-form-section:last-child {
    margin-bottom: 0;
}

/* ============================================
   FORM FIELDS
============================================ */
.amg-form-wrapper .form-label {
    font-weight: 600;
    color: #334155;
    margin-bottom: 8px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.amg-form-wrapper .form-control,
.amg-form-wrapper .form-select {
    border: 2px solid #cbd5e1;
    border-radius: var(--amg-border-radius);
    padding: 10px 15px;
    font-size: 15px;
    transition: var(--amg-transition);
    color: #0f172a;
}

.amg-form-wrapper .form-control:focus,
.amg-form-wrapper .form-select:focus {
    border-color: var(--color-primary, #2563eb);
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.15);
    outline: none;
}

/* ============================================
   COLOR PICKER
============================================ */
.amg-color-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.amg-color-group input[type="color"] {
    width: 46px;
    height: 44px;
    border: 2px solid #cbd5e1;
    border-radius: 8px;
    padding: 2px;
    cursor: pointer;
    flex-shrink: 0;
    background: none;
}

.amg-color-group input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 2px;
}

.amg-color-group input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 4px;
}

.amg-color-group .form-control {
    flex: 1;
}

/* ============================================
   DROP ZONE (UPLOAD)
============================================ */
.amg-drop-zone {
    border: 3px dashed #94a3b8;
    border-radius: var(--amg-border-radius-lg);
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--amg-transition);
    background: #f8fafc;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    user-select: none;
}

.amg-drop-zone:hover,
.amg-drop-zone.drag-over {
    border-color: var(--color-primary, #2563eb);
    background: rgba(37, 99, 235, 0.05);
    transform: translateY(-2px);
}

.amg-drop-zone.drag-over {
    border-style: solid;
}

.amg-drop-zone-icon {
    font-size: 2.8rem;
    color: #64748b;
    margin-bottom: 12px;
    transition: color 0.3s ease;
}

.amg-drop-zone:hover .amg-drop-zone-icon {
    color: var(--color-primary, #2563eb);
}

.amg-drop-zone-text {
    color: #475569;
    font-size: 0.95rem;
    line-height: 1.6;
}

.amg-drop-zone-text strong {
    color: var(--color-primary, #2563eb);
}

.amg-drop-zone-preview {
    max-width: 120px;
    max-height: 120px;
    border-radius: 14px;
    margin-bottom: 12px;
    display: none;
    object-fit: cover;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
    border: 2px solid #e2e8f0;
}

/* ============================================
   BUTTONS
============================================ */
.amg-btn-generate {
    background: linear-gradient(135deg, var(--color-primary, #2563eb), var(--color-primary-hover, #1d4ed8));
    color: #ffffff;
    border: none;
    border-radius: var(--amg-border-radius);
    padding: 16px 40px;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: var(--amg-transition);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
    width: 100%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.amg-btn-generate:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.45);
    color: #ffffff;
}

.amg-btn-generate:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.amg-btn-copy {
    background: #1e293b;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 600;
    transition: var(--amg-transition);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.amg-btn-copy:hover {
    background: #334155;
    transform: translateY(-1px);
    color: #ffffff;
}

.amg-btn-download {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 600;
    transition: var(--amg-transition);
    cursor: pointer;
    display: none;
    align-items: center;
    gap: 6px;
}

.amg-btn-download:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
    color: #ffffff;
}

/* ============================================
   PREVIEW PANEL
============================================ */
.amg-preview-wrapper {
    background: #ffffff;
    border-radius: var(--amg-border-radius-lg);
    padding: 30px;
    box-shadow: var(--amg-shadow);
    position: sticky;
    top: 100px;
    border: 1px solid #e2e8f0;
}

.amg-preview-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 20px;
    text-align: center;
}

/* ============================================
   PHONE MOCKUP
============================================ */
.amg-phone-mockup {
    width: 220px;
    height: 380px;
    margin: 0 auto 25px;
    background: #0f172a;
    border-radius: 36px;
    padding: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
    position: relative;
    overflow: hidden;
    border: 4px solid #334155;
}

.amg-phone-notch {
    width: 90px;
    height: 18px;
    background: #0f172a;
    border-radius: 0 0 14px 14px;
    margin: 0 auto;
    position: relative;
    z-index: 3;
}

.amg-phone-screen {
    width: 100%;
    height: calc(100% - 18px);
    background: #ffffff;
    border-radius: 0 0 24px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: background-color 0.3s ease;
    padding: 15px;
}

.amg-phone-icon {
    width: 68px;
    height: 68px;
    border-radius: 16px;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

.amg-phone-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

.amg-phone-icon .placeholder-icon {
    font-size: 30px;
    color: #94a3b8;
}

.amg-phone-app-name {
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    text-align: center;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ============================================
   JSON PREVIEW
============================================ */
.amg-json-wrapper {
    margin-top: 25px;
}

.amg-json-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}

.amg-json-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1e293b;
}

.amg-json-preview {
    background: #0f172a;
    color: #38bdf8;
    border-radius: 12px;
    padding: 18px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.5;
    max-height: 320px;
    overflow-y: auto;
    white-space: pre;
    border: 1px solid #1e293b;
    margin-bottom: 0;
}

.amg-json-preview::-webkit-scrollbar {
    width: 6px;
}

.amg-json-preview::-webkit-scrollbar-track {
    background: #0f172a;
}

.amg-json-preview::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 3px;
}

/* ============================================
   RESPONSIVE
============================================ */
@media (max-width: 991px) {
    .amg-header {
        padding: 3rem 0 1.5rem;
    }

    .amg-title {
        font-size: 2.2rem;
    }

    .amg-preview-wrapper {
        position: static;
        margin-top: 30px;
    }
}

@media (max-width: 768px) {
    .amg-header {
        padding: 2.5rem 0 1.2rem;
    }

    .amg-title {
        font-size: 1.9rem;
        text-align: center;
    }

    .amg-subtitle {
        text-align: center;
        font-size: 1rem;
    }

    .amg-form-wrapper {
        padding: 25px 18px;
    }

    .amg-preview-wrapper {
        padding: 25px 18px;
    }
}

@media (max-width: 576px) {
    .amg-title {
        font-size: 1.65rem;
    }

    .amg-subtitle {
        font-size: 0.9rem;
    }

    .amg-btn-generate {
        padding: 14px 25px;
        font-size: 14px;
    }

    .amg-drop-zone {
        padding: 25px 15px;
        min-height: 140px;
    }

    .amg-phone-mockup {
        width: 190px;
        height: 330px;
    }
}

/* ============================================
   DARK MODE SUPPORT (body.theme-dark & .theme-dark)
============================================ */
body.theme-dark .amg-main,
.theme-dark .amg-main {
    background-color: #111419 !important;
}

body.theme-dark .amg-header,
.theme-dark .amg-header {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%) !important;
    border-bottom: 1px solid #232936 !important;
}

body.theme-dark .amg-title,
.theme-dark .amg-title {
    color: #f8fafc !important;
}

body.theme-dark .amg-subtitle,
.theme-dark .amg-subtitle {
    color: #cbd5e1 !important;
}

body.theme-dark .amg-form-wrapper,
body.theme-dark .amg-preview-panel,
body.theme-dark .amg-section-card,
.theme-dark .amg-form-wrapper,
.theme-dark .amg-preview-panel,
.theme-dark .amg-section-card {
    background: #181c24 !important;
    border-color: #232936 !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3) !important;
}

body.theme-dark .amg-section-title,
.theme-dark .amg-section-title {
    color: #f1f5f9 !important;
    border-bottom-color: #232936 !important;
}

body.theme-dark .amg-field-label,
.theme-dark .amg-field-label {
    color: #cbd5e1 !important;
}

body.theme-dark .amg-field-hint,
.theme-dark .amg-field-hint {
    color: #94a3b8 !important;
}

body.theme-dark .amg-form-wrapper .form-control,
body.theme-dark .amg-form-wrapper .form-select,
.theme-dark .amg-form-wrapper .form-control,
.theme-dark .amg-form-wrapper .form-select {
    background-color: #111419 !important;
    border-color: #2e3440 !important;
    color: #f8fafc !important;
}

body.theme-dark .amg-form-wrapper .form-control:focus,
body.theme-dark .amg-form-wrapper .form-select:focus,
.theme-dark .amg-form-wrapper .form-control:focus,
.theme-dark .amg-form-wrapper .form-select:focus {
    background-color: #111419 !important;
    border-color: #38bdf8 !important;
    color: #f8fafc !important;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2) !important;
}

body.theme-dark .amg-form-wrapper .input-group-text,
.theme-dark .amg-form-wrapper .input-group-text {
    background-color: #1f242f !important;
    border-color: #2e3440 !important;
    color: #cbd5e1 !important;
}

body.theme-dark .amg-drop-zone,
.theme-dark .amg-drop-zone {
    background: #111419 !important;
    border-color: #334155 !important;
}

body.theme-dark .amg-drop-zone:hover,
body.theme-dark .amg-drop-zone.drag-over,
.theme-dark .amg-drop-zone:hover,
.theme-dark .amg-drop-zone.drag-over {
    background: rgba(56, 189, 248, 0.08) !important;
    border-color: #38bdf8 !important;
}

body.theme-dark .amg-drop-icon,
.theme-dark .amg-drop-icon {
    color: #64748b !important;
}

body.theme-dark .amg-drop-zone:hover .amg-drop-icon,
.theme-dark .amg-drop-zone:hover .amg-drop-icon {
    color: #38bdf8 !important;
}

body.theme-dark .amg-drop-text,
.theme-dark .amg-drop-text {
    color: #94a3b8 !important;
}

body.theme-dark .amg-drop-text strong,
.theme-dark .amg-drop-text strong {
    color: #38bdf8 !important;
}

body.theme-dark .amg-json-viewer,
.theme-dark .amg-json-viewer {
    background: #0f1117 !important;
    border: 1px solid #232936 !important;
}

body.theme-dark .amg-phone-mockup,
.theme-dark .amg-phone-mockup {
    background: #111419 !important;
    border-color: #2e3440 !important;
}

body.theme-dark .amg-preview-panel,
body.theme-dark .amg-preview-wrapper,
.theme-dark .amg-preview-panel,
.theme-dark .amg-preview-wrapper {
    background: #181c24 !important;
    border-color: #232936 !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
}

body.theme-dark .amg-preview-title,
.theme-dark .amg-preview-title {
    color: #f1f5f9 !important;
}

body.theme-dark .amg-phone-mockup,
.theme-dark .amg-phone-mockup {
    background: #0f1117 !important;
    border-color: #2e3440 !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4) !important;
}

body.theme-dark .amg-phone-notch,
.theme-dark .amg-phone-notch {
    background: #0f1117 !important;
}

body.theme-dark .amg-phone-app-name,
.theme-dark .amg-phone-app-name {
    color: #f1f5f9 !important;
}

body.theme-dark .amg-phone-icon,
.theme-dark .amg-phone-icon {
    background: #1e242f !important;
}

body.theme-dark .amg-json-title,
.theme-dark .amg-json-title {
    color: #cbd5e1 !important;
}

body.theme-dark .amg-json-preview,
.theme-dark .amg-json-preview {
    background: #0f1117 !important;
    color: #38bdf8 !important;
    border-color: #232936 !important;
}

body.theme-dark .amg-btn-copy,
.theme-dark .amg-btn-copy {
    background: #1e293b !important;
    color: #93c5fd !important;
    border-color: #334155 !important;
}

body.theme-dark .amg-btn-copy:hover,
.theme-dark .amg-btn-copy:hover {
    background: #2563eb !important;
    color: #ffffff !important;
}

