/* char-counter-style.css */

.tool-header {
    text-align: center;
    padding: 40px 20px;
    background-color: var(--white-color);
    border-bottom: 1px solid var(--border-color);
}

.tool-header h1 {
    margin: 0;
    font-size: 32px;
}

.tool-selector {
    padding: 20px;
    text-align: center;
    background-color: var(--white-color);
    border-radius: 8px;
    margin: 40px auto 30px auto;
    max-width: 500px;
    box-shadow: var(--shadow);
}

.tool-selector label {
    font-weight: 600;
    margin-right: 15px;
}

.tool-selector select {
    padding: 10px;
    font-size: 16px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    font-family: var(--font-family);
}

.platform-content-wrapper {
    padding-top: 20px;
}

/* --- 2カラムレイアウト --- */
.tool-main-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

.tool-input-area {
    /* 左側 */
}

.tool-preview-area {
    /* 右側 */
    position: sticky;
    top: 100px;
}

.preview-header {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.preview-box {
    background-color: var(--white-color);
    border: 1px solid #dfe1e5;
    border-radius: 8px;
    padding: 20px;
    font-family: Arial, sans-serif;
    /* プレビューは標準フォントに */
}

/* --- Google/Yahoo プレビュー --- */
.preview-ad-label {
    font-weight: bold;
    font-size: 14px;
}

.preview-display-url {
    display: block;
    font-size: 14px;
    color: #202124;
    margin: 5px 0;
}

.preview-ad-title {
    font-size: 20px;
    color: #1a0dab;
    font-weight: 400;
    margin: 0 0 5px 0;
}

.preview-ad-title:hover {
    text-decoration: underline;
}

.preview-ad-desc {
    font-size: 14px;
    color: #4d5156;
    line-height: 1.5;
    margin: 0;
}

/* --- Meta プレビュー --- */
.meta-preview .meta-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.meta-preview .meta-profile-pic {
    width: 40px;
    height: 40px;
    background-color: #ccc;
    border-radius: 50%;
    margin-right: 10px;
}

.meta-preview .meta-profile-name {
    font-weight: bold;
    color: #050505;
}

.meta-preview .preview-ad-desc {
    margin-bottom: 10px;
    color: #050505;
}

.meta-preview .meta-image-placeholder {
    width: 100%;
    height: 200px;
    background-color: #e0e0e0;
}

.meta-preview .meta-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f0f2f5;
    padding: 10px;
    margin: 10px -20px -20px -20px;
}

.meta-preview .meta-footer-text .preview-display-url {
    font-size: 12px;
    color: #65676b;
    text-transform: uppercase;
}

.meta-preview .meta-footer-text .preview-ad-title {
    font-size: 16px;
    color: #050505;
    font-weight: 600;
}

.meta-preview .meta-cta-button {
    background-color: #e4e6eb;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    font-weight: bold;
    color: #050505;
    font-family: inherit;
}

/* --- LINE プレビュー --- */
.line-preview {
    padding: 0;
    border: 1px solid #e0e0e0;
    overflow: hidden;
}

.line-preview .line-image-placeholder {
    width: 100%;
    height: 180px;
    background-color: #e0e0e0;
}

.line-preview .line-text-content {
    padding: 15px;
}

.line-preview .preview-ad-title {
    color: #000;
    font-size: 16px;
    font-weight: bold;
}

.line-preview .preview-ad-desc {
    color: #666;
    font-size: 13px;
}

.line-preview .line-cta-button {
    display: block;
    width: 100%;
    background-color: #06c755;
    color: white;
    text-align: center;
    padding: 12px;
    font-weight: bold;
    border: none;
    font-family: inherit;
}

/* --- X プレビュー --- */
.x-preview {
    border: 1px solid #38444d;
    background-color: #15202b;
    color: #d9d9d9;
}

.x-preview .x-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.x-preview .x-profile-pic {
    width: 48px;
    height: 48px;
    background-color: #333639;
    border-radius: 50%;
    margin-right: 12px;
}

.x-preview .x-profile-info {
    display: flex;
    flex-direction: column;
}

.x-preview .x-display-name {
    font-weight: bold;
}

.x-preview .x-user-name {
    color: #8899a6;
}

.x-preview .preview-ad-desc {
    color: #d9d9d9;
    font-size: 15px;
    margin-bottom: 10px;
}

.x-preview .x-image-placeholder {
    width: 100%;
    height: 180px;
    background-color: #333639;
    border-radius: 8px;
    margin-bottom: 10px;
}

.x-preview .x-footer {
    display: flex;
    justify-content: space-around;
    color: #8899a6;
    font-size: 18px;
}

/* --- GBP Preview --- */
.gbp-preview {
    padding: 0;
    border: 1px solid #dadce0;
}

.gbp-preview .gbp-header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
}

.gbp-preview .gbp-profile-pic {
    width: 32px;
    height: 32px;
    background-color: #ccc;
    border-radius: 50%;
    margin-right: 12px;
}

.gbp-preview .gbp-profile-name {
    font-weight: 500;
    color: #202124;
    font-size: 14px;
}

.gbp-preview .gbp-image-placeholder {
    width: 100%;
    padding-top: 56.25%;
    /* 16:9 Aspect Ratio */
    background-color: #e0e0e0;
}

.gbp-preview .gbp-content {
    padding: 12px 16px;
}

.gbp-preview .preview-ad-desc {
    font-size: 14px;
    color: #3c4043;
    margin-bottom: 12px;
}

.gbp-preview .gbp-cta-button {
    width: auto;
    background: none;
    border: none;
    color: #1a73e8;
    font-weight: bold;
    font-size: 14px;
    padding: 0;
    font-family: inherit;
}


/* --- 入力欄スタイル --- */
.campaign-box {
    background-color: var(--white-color);
    padding: 20px 30px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-bottom: 25px;
}

.campaign-title {
    font-size: 20px;
    margin-top: 0;
    margin-bottom: 20px;
    border-left: 5px solid var(--primary-color);
    padding-left: 10px;
}

.counter-group {
    margin-bottom: 20px;
}

.counter-group:last-child {
    margin-bottom: 0;
}

.counter-label {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 8px;
    font-weight: 500;
}

.char-counter {
    font-size: 14px;
    font-weight: bold;
    color: var(--light-text-color);
}

.char-counter.limit-over {
    color: var(--error-color);
}

.counter-input {
    width: 100%;
    padding: 10px;
    font-size: 16px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    box-sizing: border-box;
    font-family: var(--font-family);
    resize: vertical;
}

.counter-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

@media (max-width: 900px) {
    .tool-main-layout {
        grid-template-columns: 1fr;
    }

    .tool-preview-area {
        position: static;
        margin-top: 40px;
    }
}

@media (max-width: 768px) {

    .tool-header h1,
    .platform-title {
        font-size: 22px;
    }

    .tool-selector {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
}