﻿:root {
    --lp-mail-green: #00b96b;
    --lp-mail-green-dark: #009f5d;
    --lp-mail-line: #e2e6eb;
    --lp-mail-soft: #f7f8fa;
    --lp-mail-text: #20242a;
    --lp-mail-muted: #8a929d;
    --lp-mail-blue: #3b82f6;
    --lp-mail-danger: #ef4444;
}

.lp-mail-container,
.lp-mail-container * {
    box-sizing: border-box;
}

/* 기존 홈페이지의 메인 콘텐츠 영역 */
.lp-mail-container {
    width: 100%;
    padding: 24px 20px 40px;
    background-color: #f5f6f8;
    font-family: "Malgun Gothic", "맑은 고딕", Arial, sans-serif;
    color: var(--lp-mail-text);
}

/* 상세페이지 상단 타이틀 */
.lp-detail-title-bar {
    width: 100%;
    max-width: 1100px;
    min-height: 64px;
    margin: 0 auto 12px;
    padding: 0 20px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    background-color: #ffffff;
    border: 1px solid #dfe3e8;
    border-radius: 8px;

    box-shadow: 0 2px 7px rgba(0, 0, 0, 0.05);
}

.lp-detail-title-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.lp-detail-title-mark {
    display: block;
    width: 5px;
    height: 30px;
    background-color: #1769aa;
    border-radius: 3px;
}

.lp-detail-title-text {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.lp-detail-title-text h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #20242a;
}

.lp-detail-title-text > span {
    font-size: 12px;
    color: #9198a1;
}

.lp-detail-close-button {
    min-width: 78px;
    height: 34px;
    padding: 0 13px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;

    border: 1px solid #cfd5dc;
    border-radius: 5px;

    background-color: #ffffff;
    color: #4e5661;

    font-family: "Malgun Gothic", "맑은 고딕", sans-serif;
    font-size: 13px;

    cursor: pointer;
    transition: all 0.15s ease;
}

.lp-detail-close-button:hover {
    border-color: #e05050;
    background-color: #fff4f4;
    color: #d43d3d;
}

.lp-close-icon {
    position: relative;
    top: -1px;
    font-size: 20px;
    line-height: 1;
    font-weight: 300;
}

/* 실제 메일작성 창 */
.lp-mail-page {
    width: 100%;
    max-width: 1100px;
    min-height: 680px;

    margin: 0 auto;
    padding: 0 24px 30px;

    background-color: #ffffff;
    border: 1px solid #dfe3e8;
    border-radius: 8px;

    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.lp-mail-container button,
.lp-mail-container input,
.lp-mail-container select {
    font: inherit;
}

.lp-mail-header {
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--lp-mail-line);
}

.lp-mail-title-area {
    display: flex;
    align-items: center;
    gap: 18px;
}

.lp-compose-title {
    color: #333333;
    font-size: 15px;
    font-weight: 700;
}

.lp-draft-label {
    color: var(--lp-mail-muted);
    font-size: 13px;
}

.lp-draft-label strong {
    color: #5487d8;
}

.lp-mail-search {
    width: 220px;
    height: 34px;
    border-radius: 18px;
    background: #f1f3f7;

    display: flex;
    align-items: center;
    padding: 0 14px;
    gap: 8px;
}

.lp-mail-search input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
}

.lp-mail-actions {
    min-height: 46px;
    border-bottom: 1px solid var(--lp-mail-line);

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.lp-action-left,
.lp-action-right {
    display: flex;
    align-items: center;
    gap: 6px;
}

.lp-btn,
.lp-icon-btn,
.lp-address-btn,
.lp-upload-btn,
.lp-cc-toggle,
.lp-editor-toolbar button,
.lp-editor-toolbar select {
    border: 0;
    background: transparent;
    cursor: pointer;
}

.lp-btn {
    height: 32px;
    padding: 0 10px;
    border-radius: 5px;
}

.lp-btn:hover,
.lp-icon-btn:hover {
    background: var(--lp-mail-soft);
}

.lp-btn-send {
    border: 1px solid var(--lp-mail-green);
    color: var(--lp-mail-green-dark);
    background: #fff;
    font-weight: 700;
}

.lp-btn-send:hover {
    background: #eafff5;
}

.lp-icon-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    font-size: 17px;
}

.lp-field-row {
    display: grid;
    grid-template-columns: 90px minmax(0, 1fr);
    min-height: 56px;

    border-bottom: 1px solid var(--lp-mail-line);
    align-items: center;
}

.lp-field-row > label {
    padding-left: 10px;
    font-weight: 700;
    font-size: 14px;
}

.lp-field-content {
    min-width: 0;
}

.lp-recipient-content,
.lp-subject-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.lp-line-input {
    width: 100%;
    height: 38px;

    border: 0;
    border-bottom: 1px solid #b6bcc5;
    outline: none;

    padding: 7px 5px;
    font-size: 14px;
    background: transparent;
}

.lp-line-input:focus {
    border-bottom-color: var(--lp-mail-blue);
    box-shadow: 0 1px 0 var(--lp-mail-blue);
}

.lp-address-btn {
    min-width: 72px;
    height: 32px;

    border: 1px solid var(--lp-mail-line);
    border-radius: 5px;
    background: #fff;
}

.lp-cc-row {
    min-height: 45px;
}

.lp-cc-toggle {
    padding: 8px 0;
    color: #444;
}

.lp-cc-fields {
    display: none;
    padding: 4px 0 12px;
}

.lp-cc-fields.lp-open {
    display: block;
}

.lp-cc-line {
    display: grid;
    grid-template-columns: 72px 1fr;
    align-items: center;
    gap: 10px;
}

.lp-cc-line span {
    color: var(--lp-mail-muted);
    font-size: 13px;
}

.lp-important-check {
    display: flex;
    align-items: center;
    white-space: nowrap;
    gap: 5px;

    font-size: 13px;
    color: #5c6470;
}

.lp-important-check strong {
    color: var(--lp-mail-danger);
}

.lp-subject-input {
    flex: 1;
}

.lp-attachment-row {
    align-items: start;
    padding: 10px 0 14px;
}

.lp-attachment-row > label {
    padding-top: 8px;
}

.lp-attach-head {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
}

.lp-upload-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 62px;
    height: 30px;
    padding: 0 12px;

    border: 1px solid var(--lp-mail-line);
    border-radius: 5px;

    background: #fff;
    color: #333;
}

.lp-file-input {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.lp-attach-limit {
    margin-left: auto;
    color: var(--lp-mail-muted);
    font-size: 12px;
}

.lp-drop-zone {
    height: 62px;

    border: 1px solid var(--lp-mail-line);
    border-radius: 6px;

    display: flex;
    align-items: center;
    justify-content: center;

    color: #8b929c;
    cursor: pointer;
    transition: 0.15s ease;
}

.lp-drop-zone.lp-dragover {
    border-color: var(--lp-mail-blue);
    background: #f4f8ff;
    color: var(--lp-mail-blue);
}

.lp-file-list {
    margin: 8px 0 0;
    padding: 0;

    list-style: none;
    font-size: 12px;
    color: #58606c;
}

.lp-file-list li {
    padding: 4px 2px;
}

.lp-editor-section {
    border-bottom: 1px solid var(--lp-mail-line);
}

.lp-editor-toolbar {
    min-height: 40px;

    display: flex;
    align-items: center;
    flex-wrap: wrap;

    border-bottom: 1px solid var(--lp-mail-line);
    background: #fafbfc;
}

.lp-editor-toolbar select {
    height: 40px;
    min-width: 120px;

    padding: 0 12px;
    border-right: 1px solid var(--lp-mail-line);

    color: #333;
    outline: none;
}

.lp-editor-toolbar select#fontSize {
    min-width: 90px;
}

.lp-editor-toolbar button {
    width: 38px;
    height: 40px;

    border-right: 1px solid #edf0f3;

    color: #303640;
    font-size: 14px;
}

.lp-editor-toolbar button:hover {
    background: #eef2f7;
}

.lp-mail-editor {
    min-height: 440px;
    padding: 18px 20px;

    outline: none;
    font-size: 14px;
    line-height: 1.65;
    overflow-wrap: anywhere;
}

.lp-mail-editor:empty::before {
    content: attr(data-placeholder);
    color: #b0b7c0;
    pointer-events: none;
}

.lp-status-message {
    display: block;
    min-height: 24px;
    padding: 12px 10px;
    font-size: 13px;
}

.lp-status-message.lp-success {
    color: #07884f;
    background: #effcf5;
}

.lp-status-message.lp-error {
    color: #ba1a1a;
    background: #fff1f1;
}

@media (max-width: 760px) {
    .lp-mail-container {
        padding: 10px 6px 20px;
    }

    .lp-detail-title-bar {
        width: 100%;
        min-height: 56px;

        margin-bottom: 8px;
        padding: 0 12px;

        border-left: 0;
        border-right: 0;
        border-radius: 0;
    }

    .lp-detail-title-text h2 {
        font-size: 17px;
    }

    .lp-detail-title-text > span {
        display: none;
    }

    .lp-detail-close-button {
        min-width: 65px;
        height: 32px;
        padding: 0 9px;
    }

    .lp-mail-page {
        width: 100%;
        margin: 0;
        padding: 0 10px 22px;

        border-left: 0;
        border-right: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .lp-mail-search {
        display: none;
    }

    .lp-mail-actions {
        align-items: flex-start;
        padding: 8px 0;
    }

    .lp-action-left {
        flex-wrap: wrap;
    }

    .lp-action-right {
        display: none;
    }

    .lp-field-row {
        grid-template-columns: 76px minmax(0, 1fr);
    }

    .lp-attach-head {
        flex-wrap: wrap;
    }

    .lp-attach-limit {
        width: 100%;
        margin-left: 0;
    }

    .lp-mail-editor {
        min-height: 360px;
    }
}
