/*
This file is part of Telegram Desktop,
the official desktop application for the Telegram messaging service.

For license and copyright information please follow this link:
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/
using "ui/basic.style";
using "boxes/boxes.style";
using "ui/widgets/widgets.style";
using "ui/layers/layers.style";

PremiumLimits {
	boxLabel: FlatLabel;
	nonPremiumBg: color;
	nonPremiumFg: color;
	gradientFromLeft: bool;
}
PremiumBubble {
	widthLimit: pixels;
	height: pixels;
	padding: margins;
	skip: pixels;
	penWidth: pixels;
	textSkip: pixels;
	tailSize: size;
	font: font;
}

defaultPremiumBoxLabel: FlatLabel(defaultFlatLabel) {
	minWidth: 220px;
	align: align(topleft);
	style: TextStyle(boxTextStyle) {
		lineHeight: 22px;
	}
}
defaultPremiumLimits: PremiumLimits {
	boxLabel: defaultPremiumBoxLabel;
	nonPremiumBg: windowBgOver;
	nonPremiumFg: windowFg;
	gradientFromLeft: false;
}

// Preview.
premiumPreviewBox: Box(defaultBox) {
	buttonPadding: margins(18px, 18px, 18px, 18px);
	buttonHeight: 44px;
	button: RoundButton(defaultActiveButton) {
		height: 44px;
		textTop: 12px;
		font: font(13px semibold);
	}
}
premiumPreviewDoubledLimitsBox: Box(premiumPreviewBox) {
	buttonPadding: margins(12px, 12px, 12px, 12px);
}
premiumPreviewAboutTitlePadding: margins(18px, 19px, 18px, 0px);
premiumPreviewAboutTitle: FlatLabel(defaultFlatLabel) {
	minWidth: 240px;
	textFg: windowBoldFg;
	align: align(top);
	style: TextStyle(defaultTextStyle) {
		font: font(17px semibold);
		linkFont: font(17px semibold);
		linkFontOver: font(17px semibold);
	}
}
premiumPreviewAbout: FlatLabel(defaultFlatLabel) {
	minWidth: 240px;
	textFg: membersAboutLimitFg;
	align: align(top);
}
premiumPreviewAboutPadding: margins(18px, 8px, 18px, 8px);
premiumPreviewButtonLabel: FlatLabel(defaultFlatLabel) {
	textFg: premiumButtonFg;
	style: semiboldTextStyle;
}
premiumSlideDuration: 200;
premiumVideoStarSize: size(77px, 73px);

premiumPreviewHeight: 312px;

premiumDot: 6px;
premiumDotPadding: margins(4px, 4px, 4px, 4px);
premiumDotsMargin: margins(0px, 5px, 0px, 6px);
premiumVideoWidth: 182px;

// Graphics.

defaultPremiumBubble: PremiumBubble {
	widthLimit: 80px;
	height: 40px;
	padding: margins(14px, 0px, 14px, 0px);
	skip: 8px;
	penWidth: 6px;
	textSkip: 3px;
	tailSize: size(21px, 7px);
	font: font(19px);
}
premiumLineTextSkip: 11px;
premiumInfographicPadding: margins(0px, 10px, 0px, 15px);

premiumIconChats: icon {{ "limits/chats", settingsIconFg }};
premiumIconFiles: icon {{ "limits/files", settingsIconFg }};
premiumIconFolders: icon {{ "limits/folders", settingsIconFg }};
premiumIconGroups: icon {{ "limits/groups", settingsIconFg }};
premiumIconLinks: icon {{ "limits/links", settingsIconFg }};
premiumIconPins: icon {{ "limits/pins", settingsIconFg }};
premiumIconAccounts: icon {{ "limits/accounts", settingsIconFg }};
premiumIconBoost: icon {{ "limits/boost", settingsIconFg }};

premiumAccountsCheckbox: RoundImageCheckbox(defaultPeerListCheckbox) {
	imageRadius: 27px;
	imageSmallRadius: 23px;
	check: RoundCheckbox(defaultRoundCheckbox) {
		size: 0px;
	}
}
premiumAccountsLabelSize: size(22px, 15px);
premiumAccountsLabelPadding: margins(2px, 2px, 2px, 2px);
premiumAccountsLabelRadius: 6;
premiumAccountsNameTop: 13px;
premiumAccountsPadding: margins(0px, 20px, 0px, 14px);
premiumAccountsHeight: 105px;

PremiumOption {
	rowPadding: margins;
	rowMargins: margins;
	rowHeight: pixels;

	borderWidth: pixels;
	borderRadius: pixels;

	subtitleTop: pixels;
	textLeft: pixels;

	badgeHeight: pixels;
	badgeRadius: pixels;
	badgeMargins: margins;
	badgeShift: point;
}

premiumSubscriptionOption: PremiumOption {
	rowPadding: margins(9px, 2px, 17px, 3px);
	rowMargins: margins(14px, 0px, 5px, 0px);
	rowHeight: 39px;

	borderWidth: 0px;
	borderRadius: 0px;

	subtitleTop: 1px;
	textLeft: 51px;

	badgeHeight: 15px;
	badgeRadius: 4px;
	badgeMargins: margins(3px, 1px, 3px, 0px);
	badgeShift: point(9px, 0px);
}

// Gift.
premiumGiftOption: PremiumOption {
	rowPadding: margins(19px, 2px, 17px, 2px);
	rowMargins: margins(14px, 0px, 15px, 0px);
	rowHeight: 56px;

	borderWidth: 2px;
	borderRadius: 9px;

	subtitleTop: 7px;
	textLeft: 53px;

	badgeHeight: 18px;
	badgeRadius: 4px;
	badgeMargins: margins(5px, 1px, 5px, 0px);
}

premiumGiftUserpicPadding: margins(10px, 27px, 18px, 13px);
premiumGiftTitlePadding: margins(18px, 0px, 18px, 0px);
premiumGiftAboutPadding: margins(18px, 5px, 18px, 23px);
premiumGiftTermsPadding: margins(18px, 27px, 18px, 0px);
premiumGiftTerms: FlatLabel(defaultFlatLabel) {
	minWidth: 256px;
	align: align(top);
	textFg: windowSubTextFg;
	style: TextStyle(defaultTextStyle) {
		font: font(11px);
		linkFont: font(11px);
		linkFontOver: font(11px underline);
	}
}
premiumGiftBox: Box(premiumPreviewBox) {
	buttonPadding: margins(12px, 12px, 12px, 12px);
}

boostSkipTop: 37px;
boostLimits: PremiumLimits(defaultPremiumLimits) {
	gradientFromLeft: true;
}
boostBubble: PremiumBubble(defaultPremiumBubble) {
	height: 32px;
	padding: margins(7px, 0px, 11px, 0px);
	skip: 5px;
	textSkip: 2px;
	tailSize: size(14px, 6px);
	font: font(16px);
}
boostTitleSkip: 32px;
boostTitle: FlatLabel(defaultFlatLabel) {
	minWidth: 40px;
	textFg: windowBoldFg;
	align: align(top);
	maxHeight: 24px;
	style: TextStyle(boxTextStyle) {
		font: font(17px semibold);
		linkFont: font(17px semibold);
		linkFontOver: font(17px semibold);
	}
}
boostTextSkip: 5px;
boostText: FlatLabel(defaultFlatLabel) {
	minWidth: 40px;
	align: align(top);
}
boostBottomSkip: 6px;
boostBox: Box(premiumPreviewDoubledLimitsBox) {
	buttonPadding: margins(22px, 22px, 22px, 22px);
	buttonHeight: 42px;
	button: RoundButton(defaultActiveButton) {
		height: 42px;
		textTop: 12px;
		font: font(13px semibold);
	}
}

boostReplaceUserpicsPadding: margins(0px, 18px, 0px, 20px);
boostReplaceUserpicsSkip: 42px;
boostReplaceUserpic: UserpicButton(defaultUserpicButton) {
	size: size(60px, 60px);
	photoSize: 60px;
}
boostReplaceIcon: icon{{ "stories/boost_mini", windowBg }};
boostReplaceIconSkip: 3px;
boostReplaceIconOutline: 2px;
boostReplaceIconAdd: point(4px, 2px);
boostReplaceArrow: icon{{ "mediaview/next", windowSubTextFg }};
