@import 'mediawiki.mixins';

.flow-ui-newTopicWidget {
	clear: both;

	&-title.oo-ui-textInputWidget {
		// OO.ui.TextInputWidget has a max-width: 50 by default
		max-width: none;

		input {
			.flow-ui-newTopicWidget-expanded & {
				border-bottom-left-radius: 0;
				border-bottom-right-radius: 0;
			}

			// Match heading styles
			font-size: 1.5em;
			font-weight: bold;
			line-height: 1.25em;

			// Reproduce mw-input
			-webkit-appearance: none;
			box-sizing: border-box;
			width: 100%;
			padding: 0.429em 0.381em 0.381em;
			display: block;
			vertical-align: middle;
			font-family: inherit;
			.transition( ~'border 200ms cubic-bezier( 0.39, 0.575, 0.565, 1 ), box-shadow 200ms cubic-bezier( 0.39, 0.575, 0.565, 1 )' );

			/* stylelint-disable indentation */
			.mixin-placeholder( {
				font-weight: normal;
			} );
			/* stylelint-enable indentation */
		}
	}

	&-editor {
		.flow-ui-editorWidget-editor {
			margin-top: -1px;
			border-top-left-radius: 0;
			border-top-right-radius: 0;
		}

		.flow-ui-editorWidget-focused .flow-ui-editorWidget-editor {
			/* Force above the title widget so border isn't cropped */
			position: relative;
		}
	}
}
